From: Guenter Roeck <linux@roeck-us.net>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ian.campbell@citrix.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Grant Likely <grant.likely@linaro.org>
Subject: Re: [PATCH v2 3/6] extcon-gpio: Add support for active-low presence detect pins
Date: Wed, 11 Sep 2013 17:23:32 -0700 [thread overview]
Message-ID: <52310984.30809@roeck-us.net> (raw)
In-Reply-To: <52310355.7060004@samsung.com>
On 09/11/2013 04:57 PM, Chanwoo Choi wrote:
> Hi Guenter,
>
> As I mentioned on previous reply, I modify patch name as following:
> extcon-gpio: Add support for active-low presence detect pins
> ->
> extcon: gpio: Add support for active-low presence detect pins
>
> I prefer you could add patch description. Also, you should test
As mentioned before, I sent out v2 of this patch before I read your comments
to the previous patch.
> on extcon latest branch to protect merge conflict. This patch
> has conflict issue on extcon-linus branch. I fix up and applied it.
>
I'll make sure to so that in the future.
> And I think you might use tab size is 4 characters. you should change tab size
> from 4 characters to 8 characters. You can check linux kernel coding sytle on
Thanks for the reminder, but the problem is a different one. See below.
> "/kernel/Documentation/CodingStyle - chapter 1: Indentation".
>
> On 09/11/2013 11:25 AM, Guenter Roeck wrote:
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>> v2: Document gpio_active_low variable in gpio_extcon_platform_data
>> Rewrite active-low logic to be easier to read.
>>
>> drivers/extcon/extcon-gpio.c | 4 ++++
>> include/linux/extcon/extcon-gpio.h | 5 +++++
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c
>> index 862743b..8491f86 100644
>> --- a/drivers/extcon/extcon-gpio.c
>> +++ b/drivers/extcon/extcon-gpio.c
>> @@ -34,6 +34,7 @@
>> struct gpio_extcon_data {
>> struct extcon_dev edev;
>> unsigned gpio;
>> + bool gpio_active_low;
>> const char *state_on;
>> const char *state_off;
>> int irq;
>> @@ -49,6 +50,8 @@ static void gpio_extcon_work(struct work_struct *work)
>> work);
>>
>> state = gpio_get_value(data->gpio);
>> + if (data->gpio_active_low)
>> + state = !state;
>> extcon_set_state(&data->edev, state);
>> }
>>
>> @@ -96,6 +99,7 @@ static int gpio_extcon_probe(struct platform_device *pdev)
>>
>> extcon_data->edev.name = pdata->name;
>> extcon_data->gpio = pdata->gpio;
>> + extcon_data->gpio_active_low = pdata->gpio_active_low;
>> extcon_data->state_on = pdata->state_on;
>> extcon_data->state_off = pdata->state_off;
>> if (pdata->state_on && pdata->state_off)
>> diff --git a/include/linux/extcon/extcon-gpio.h b/include/linux/extcon/extcon-gpio.h
>> index 2d8307f..51ef15c 100644
>> --- a/include/linux/extcon/extcon-gpio.h
>> +++ b/include/linux/extcon/extcon-gpio.h
>> @@ -27,6 +27,10 @@
>> * struct gpio_extcon_platform_data - A simple GPIO-controlled extcon device.
>> * @name The name of this GPIO extcon device.
>> * @gpio Corresponding GPIO.
>> + * @gpio_active_low:
>> + * Boolean describing whether gpio active state is 1 or 0
>> + * If true, low state of gpio means active.
>> + * If false, high state of gpio means active.
>
> I think you may use tab size is 4 characters.
>
No, that isn't it. When I cut-and-pasted your proposed text I was not careful enough
and did not remove a space after the '*'. No idea how it got there, but it isn't the
tab setting.
Usually I _do_ run my patches through checkpatch.pl to avoid problems like that.
Sorry, my bad; looks like I was shooting too quickly last night and didn't do that.
Guenter
next prev parent reply other threads:[~2013-09-12 0:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 4:29 [PATCH 0/6] extcon-gpio: Add devicetree support Guenter Roeck
2013-08-30 4:29 ` [PATCH 1/6] extcon-gpio: Do not unnecessarily initialize variables Guenter Roeck
2013-09-11 1:16 ` Chanwoo Choi
2013-08-30 4:29 ` [PATCH 2/6] extcon-gpio: If the gpio driver/chip supports debounce, use it Guenter Roeck
2013-09-11 1:16 ` Chanwoo Choi
2013-09-11 1:57 ` Guenter Roeck
2013-09-11 2:03 ` Chanwoo Choi
2013-09-11 2:16 ` [PATCH v2 2/6] extcon-gpio: Use gpio driver/chip debounce if supported Guenter Roeck
2013-09-11 2:29 ` Chanwoo Choi
2013-09-11 2:39 ` Guenter Roeck
2013-08-30 4:29 ` [PATCH 3/6] extcon-gpio: Add support for active-low presence detect pins Guenter Roeck
2013-09-11 2:14 ` Chanwoo Choi
2013-09-11 2:25 ` [PATCH v2 " Guenter Roeck
2013-09-11 23:57 ` Chanwoo Choi
2013-09-12 0:23 ` Guenter Roeck [this message]
2013-08-30 4:29 ` [RFC PATCH 4/6] extcon-gpio: Add devicetree support Guenter Roeck
2013-09-12 16:45 ` Mark Rutland
2013-09-12 17:00 ` Guenter Roeck
2013-08-30 4:29 ` [RFC PATCH 5/6] extcon-gpio: Describe devicetree bindings Guenter Roeck
2013-09-12 16:41 ` Mark Rutland
2013-09-12 16:53 ` Guenter Roeck
2013-09-16 14:21 ` Mark Rutland
[not found] ` <20130916142147.GF30650-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-09-16 15:19 ` Guenter Roeck
2013-09-16 15:19 ` Guenter Roeck
[not found] ` <20130916151953.GA5801-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-09-18 15:38 ` Mark Rutland
2013-09-18 15:38 ` Mark Rutland
[not found] ` <20130918153828.GB17453-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-09-19 16:42 ` Mark Brown
2013-09-19 16:42 ` Mark Brown
[not found] ` <20130919164245.GG21013-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-09-19 18:28 ` Guenter Roeck
2013-09-19 18:28 ` Guenter Roeck
[not found] ` <20130919182850.GA22775-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-09-19 18:35 ` Mark Brown
2013-09-19 18:35 ` Mark Brown
2013-08-30 4:29 ` [RFC PATCH 6/6] extcon-gpio: Describe possible properties to support multi-type cables Guenter Roeck
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=52310984.30809@roeck-us.net \
--to=linux@roeck-us.net \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=myungjoo.ham@samsung.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=swarren@wwwdotorg.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.