From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753219AbbJEKjh (ORCPT ); Mon, 5 Oct 2015 06:39:37 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:50739 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbbJEKjd (ORCPT ); Mon, 5 Oct 2015 06:39:33 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfee68d-f79ae6d00000149a-cf-56125363c686 Content-transfer-encoding: 8BIT Message-id: <56125363.4060203@samsung.com> Date: Mon, 05 Oct 2015 19:39:31 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: myungjoo.ham@samsung.com, "linux-kernel@vger.kernel.org" Cc: "robh+dt@kernel.org" , "pawel.moll@arm.com" , "mark.rutland@arm.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , "devicetree@vger.kernel.org" Subject: Re: [PATCH v2] extcon: gpio: Add the support for Device tree bindings References: <194162595.571031444032234245.JavaMail.weblogic@epmlwas07a> In-reply-to: <194162595.571031444032234245.JavaMail.weblogic@epmlwas07a> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWyRsSkSDclWCjM4JC+xfwj51gt+t8sZLU4 92olo8XlXXPYLJZev8hkcbtxBZvFhOlrWSxa9x5hd+DwWDNvDaPH5b5eJo+Vy7+weWxa1cnm 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBn/Lj5iK7gkWfHpxS2WBsYO0S5GTg4JAROJi5cb 2CBsMYkL99YD2VwcQgIrGCWOXpvODFPU1PWeFSKxlFHi1Z73YAleAUGJH5PvsXQxcnAwC8hL HLmUDWGqS0yZkgtR/oBR4umVyywQ5VoSh2fuAGtlEVCV+DfhDlicDSi+/8UNNpBeUYEIie4T lSB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yvODG3uDQvXS85P3cT IzjSn0ntYDy4y/0QowAHoxIP74F4wTAh1sSy4srcQ4wSHMxKIryWrkJhQrwpiZVVqUX58UWl OanFhxhNgd6byCwlmpwPTEJ5JfGGxiZmRpZG5oYWRsbmSuK8Nw4xhAkJpCeWpGanphakFsH0 MXFwSjUwRm2dorJip+9xuZPZ9/zZbJ3jebtVZ4lofHq4PnRj7qQFdWFf655/YO2OULh+/vnv hf9ergl8s6G5bVnF0enrC4+VRXjP5Zi8+5pExCWlq5LiSvoON6XtVQ+LL3z5PDm0xeY768cp swWn1taXztZjfJZ78o6/yjLxjmUMMVu1by3fcCB4/pXoq0osxRmJhlrMRcWJALb2UTwKAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015년 10월 05일 17:03, MyungJoo Ham wrote: >> >> This patch adds the support for Device tree bindings of extcon-gpio driver. >> The extcon-gpio device tree node must include the both 'extcon-id' and >> 'extcon-gpio' property. >> > [] >> >> Signed-off-by: Chanwoo Choi > > > Except for some beautification issues described below, > > Signed-off-by: MyungJoo Ham > >> --- >> This patch is based on following patch[1]. >> [1] https://lkml.org/lkml/2015/10/3/304 >> >> Changes from v1: >> - Create the include/dt-bindings/extcon/extcon.h including the identification >> of external connector. These definitions are used in dts file. >> - Fix error if CONFIG_OF is disabled. >> >> .../devicetree/bindings/extcon/extcon-gpio.txt | 38 +++++++ >> drivers/extcon/extcon-gpio.c | 110 ++++++++++++++++----- >> include/dt-bindings/extcon/extcon.h | 44 +++++++++ >> include/linux/extcon/extcon-gpio.h | 6 +- >> 4 files changed, 173 insertions(+), 25 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/extcon/extcon-gpio.txt >> create mode 100644 include/dt-bindings/extcon/extcon.h >> >> diff --git a/Documentation/devicetree/bindings/extcon/extcon-gpio.txt b/Documentation/devicetree/bindings/extcon/extcon-gpio.txt >> new file mode 100644 >> index 000000000000..70c36f729963 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/extcon/extcon-gpio.txt > [] >> diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c >> index 279ff8f6637d..7f3e24aae0c4 100644 >> --- a/drivers/extcon/extcon-gpio.c >> +++ b/drivers/extcon/extcon-gpio.c >> @@ -1,8 +1,8 @@ >> /* >> * extcon_gpio.c - Single-state GPIO extcon driver based on extcon class >> * >> - * Copyright (C) 2008 Google, Inc. >> - * Author: Mike Lockwood >> + * Copyright (C) 2015 Chanwoo Choi , Samsung Electronics >> + * Copyright (C) 2008 Mike Lockwood , Google, Inc. >> * >> * Modified by MyungJoo Ham to support extcon >> * (originally switch class is supported) > > Let's make it in chronological order. > (may need to "beautify the last two lines as well) > > I.e., 2008-->2012-->2015 or 2015-->2012-->2008. > Not 2015-->2008-->2012 OK. I'll modify it. > > >> @@ -26,12 +26,14 @@ > [] >> diff --git a/include/dt-bindings/extcon/extcon.h b/include/dt-bindings/extcon/extcon.h >> new file mode 100644 >> index 000000000000..14c7f36b2206 >> --- /dev/null >> +++ b/include/dt-bindings/extcon/extcon.h > [] >> diff --git a/include/linux/extcon/extcon-gpio.h b/include/linux/extcon/extcon-gpio.h >> index 7cacafb78b09..bcc6d7f7116a 100644 >> --- a/include/linux/extcon/extcon-gpio.h >> +++ b/include/linux/extcon/extcon-gpio.h > [] >> @@ -38,7 +38,7 @@ struct gpio_extcon_pdata { >> unsigned int extcon_id; >> unsigned gpio; >> bool gpio_active_low; >> - unsigned long debounce; >> + unsigned int debounce; > > What about u32, making it more clear? > ( > + device_property_read_u32(dev, "debounce-ms", &pdata->debounce); ) OK. Thanks, Chanwoo Choi