[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130715064949.GA11486@S2101-09.ap.freescale.net>
Date: Mon, 15 Jul 2013 14:49:51 +0800
From: Shawn Guo <shawn.guo@...aro.org>
To: Robin Gong <b38343@...escale.com>
CC: <linux-kernel@...r.kernel.org>, <grant.likely@...aro.org>,
<rob.herring@...xeda.com>, <lgirdwood@...il.com>,
<broonie@...nel.org>, <devicetree-discuss@...ts.ozlabs.org>,
<linux-doc@...r.kernel.org>, <rob@...dley.net>
Subject: Re: [PATCH v2] regulator: pfuze100: add pfuze100 regulator driver
On Mon, Jul 15, 2013 at 02:40:39PM +0800, Robin Gong wrote:
> > > +static const struct of_device_id pfuze_dt_ids[] = {
> > > + { .compatible = "fsl,pfuze100", .data = (void *)PFUZE_ID_PFUZE100},
> >
> > You do not use .data in the driver at all, and can just drop it.
> >
> good catch. .driver_data of i2c_device_id and .data of of_device_id are two different ways to let driver know which chip used now by DTS or not. I should use them to know which chip used now ,although I can know by reading chipid register.
>
If you can figure out the chip ID from hardware, it should be used as
the preference over compatible and .driver_data.
Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists