From: Florian Vaussard <florian.vaussard@epfl.ch>
To: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: linux-omap@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
Rob Herring <rob.herring@calxeda.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] gpio-twl4030: get platform data from device tree
Date: Wed, 05 Sep 2012 09:10:00 +0200 [thread overview]
Message-ID: <5046FAC8.5080609@epfl.ch> (raw)
In-Reply-To: <5045AD54.5030503@ti.com>
>
> On 9/3/2012 7:24 PM, Florian Vaussard wrote:
>> Adds a number of missing properties to the device tree of
>> twl4030/gpio:
>> - "ti,use-leds" -> .use_leds
>> - "ti,debounce" -> .debounce
>> - "ti,mmc-cd" -> .mmc_cd
>> - "ti,pullups" -> .pullups
>> - "ti,pulldowns" -> .pulldowns
>>
>> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
>> ---
>> drivers/gpio/gpio-twl4030.c | 86 +++++++++++++++++++++++++++++-------------
>> 1 files changed, 59 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c
>> index 94256fe..dabe76b 100644
>> --- a/drivers/gpio/gpio-twl4030.c
>> +++ b/drivers/gpio/gpio-twl4030.c
>> @@ -395,6 +395,33 @@ static int __devinit gpio_twl4030_debounce(u32 debounce, u8 mmc_cd)
>>
>> static int gpio_twl4030_remove(struct platform_device *pdev);
>>
>> +static struct twl4030_gpio_platform_data *of_gpio_twl4030(struct device *dev)
>> +{
>> + struct twl4030_gpio_platform_data *omap_twl_info;
>> + const char *of_use_leds;
>> +
>> + omap_twl_info = devm_kzalloc(dev, sizeof(*omap_twl_info), GFP_KERNEL);
>> + if (!omap_twl_info)
>> + return NULL;
>> +
>> + omap_twl_info->gpio_base = -1;
>> +
>> + of_property_read_string(dev->of_node, "ti,use-leds", &of_use_leds);
>> + if (!strcmp(of_use_leds, "true"))
>> + omap_twl_info->use_leds = true;
>> +
> You can replace this with
>
> omap_twl_info->use_leds = of_property_read_bool(dev->of_node,
> "ti,use-leds");
>
> Otherwise looks OK to me, also I have tested it on OMAP3EVM.
>
> Tested-&-Acked-By: Vaibhav Hiremath <hvaibhav@ti.com>
Thank you Vaibhav for your review. I will send a v2 today.
Regards,
Florian
next prev parent reply other threads:[~2012-09-05 7:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 13:54 [PATCH 0/3] gpio-twl4030: add new device tree properties Florian Vaussard
2012-09-03 13:54 ` [PATCH 1/3] gpio-twl4030: get platform data from device tree Florian Vaussard
2012-09-04 7:27 ` Vaibhav Hiremath
2012-09-05 7:10 ` Florian Vaussard [this message]
2012-09-04 7:30 ` Linus Walleij
2012-09-06 20:47 ` Tony Lindgren
2012-09-03 13:54 ` [PATCH 2/3] gpio-twl4030: new dt properties for BeagleBoard and omap3-EVM Florian Vaussard
2012-09-04 7:27 ` Vaibhav Hiremath
2012-09-04 7:30 ` Linus Walleij
2012-09-03 13:54 ` [PATCH 3/3] gpio-twl4030: updates the bindings for new dt properties Florian Vaussard
2012-09-04 7:31 ` Linus Walleij
2012-09-03 14:28 ` [PATCH 0/3] gpio-twl4030: add new device tree properties Benoit Cousson
2012-09-03 20:45 ` Florian Vaussard
[not found] ` <5044BE79.4040100-l0cyMroinI0@public.gmane.org>
2012-09-04 4:51 ` Hiremath, Vaibhav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5046FAC8.5080609@epfl.ch \
--to=florian.vaussard@epfl.ch \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=hvaibhav@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rob.herring@calxeda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).