Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932272AbcK3IR7 (ORCPT ); Wed, 30 Nov 2016 03:17:59 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:58001 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbcK3IRv (ORCPT ); Wed, 30 Nov 2016 03:17:51 -0500 X-AuditID: cbfec7f2-f79556d000002c42-5b-583e8b2baa37 Subject: Re: [PATCH V3] leds: pca955x: Add ACPI support for pca955x To: Tin Huynh Cc: Mika Westerberg , "Rafael J. Wysocki" , Richard Purdie , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Loc Ho , Thang Nguyen , Phong Vo , patches From: Jacek Anaszewski Message-id: Date: Wed, 30 Nov 2016 09:17:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRmVeSWpSXmKPExsWy7djPc7ra3XYRBnPvmlm03OplsVi+r5/R 4vKuOWwWW9+sY7SYsv0Iu0XzmW9sFh1rvjFanDl9idVi966nrBbHOqMsfndMZnXg9vi4/hOj x7yTgR5brrazeOyZ/4PV4/MmuQDWKC6blNSczLLUIn27BK6M38c2MxbsE63o6d/H1MC4XLCL kZNDQsBE4u7pVmYIW0ziwr31bF2MXBxCAksZJV4f/McI4XxmlHg0s4MRpmP5oWdQiWWMEgvX foBqecYo0TDnAdgsYQFnicdf3rOC2CIC8hKXZuwA62AWOMUk0XCzHSzBJmAo8fPFayYQm1fA TqJ37yv2LkYODhYBVYk/j2pATFGBCIndd1MhKgQlfky+xwJicwoES6z90gpmMwtYSTz718oK YctLbF7zlhlklYTAIXaJSUtvs4DMkRCQldh0AOpNF4nzm1awQtjCEq+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KU4GBWEuE1b7eLEOJNSaysSi3Kjy8qzUktPsRoCvTDRGYp0eR8YHrIK4k3NDE0 tzQ0MrawMDcyUhLnLflwJVxIID2xJDU7NbUgtQimj4mDU6qBUXRbsXLThiRPnVR7lQU3dLT2 2L3jXOup7MTY8OVMa+uzU2u+5PfpbLwiphNRuHbDBu91J34czmjQb60VLswT+S2eoLfzTdzB WwkTpDaFKSn6iwWuKSnXnbFP9vHmd3eThM5yBMxY/+J30k/uWW+snmU23my7GhgbNs/ilTS/ VHSVvOA5izdflViKMxINtZiLihMBkeXHqtcCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161130081747eucas1p2b70aedadfd2bf91a7b3f745d7a419b00 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?SmFjZWsgQW5hc3pld3NraRtTUlBPTC1TeXN0ZW0gRlcgIChN?= =?UTF-8?B?Qikb7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?SmFjZWsgQW5hc3pld3NraRtTUlBPTC1TeXN0ZW0gRlcgIChN?= =?UTF-8?B?QikbU2Ftc3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgU29mdHdhcmUgRW5naW5l?= =?UTF-8?B?ZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjc1MjY=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161130030845epcas5p2369d1c7cabb765ef0039b8e8d5aaa965 X-RootMTR: 20161130030845epcas5p2369d1c7cabb765ef0039b8e8d5aaa965 References: <1480475311-14385-1-git-send-email-tnhuynh@apm.com> <302ebc57-6f52-b0ff-e354-0c67556a88ed@samsung.com> <7efcf021-72c9-328a-ad88-4c226e8b5d6d@samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2664 Lines: 86 On 11/30/2016 09:06 AM, Tin Huynh wrote: > On Wed, Nov 30, 2016 at 3:01 PM, Jacek Anaszewski > wrote: >> >> On 11/30/2016 08:51 AM, Jacek Anaszewski wrote: >>> >>> Hi Tin, >>> >>> How this patch is different from the one already merged? >>> >>> Best regards, >>> Jacek Anaszewski >>> >>> On 11/30/2016 04:08 AM, Tin Huynh wrote: >>>> >>>> This patch enables ACPI support for leds-pca955x driver. >>>> >>>> Signed-off-by: Tin Huynh >>>> --- >>>> drivers/leds/leds-pca955x.c | 22 +++++++++++++++++++++- >>>> 1 files changed, 21 insertions(+), 1 deletions(-) >>>> >>>> Change from V2: >>>> -Correct coding conventions. >>>> >>>> Change from V1: >>>> -Remove CONFIG_ACPI. >>>> >>>> diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c >>>> index 840401a..b168ebe 100644 >>>> --- a/drivers/leds/leds-pca955x.c >>>> +++ b/drivers/leds/leds-pca955x.c >>>> @@ -40,6 +40,7 @@ >>>> * bits the chip supports. >>>> */ >>>> >>>> +#include >>>> #include >>>> #include >>>> #include >>>> @@ -100,6 +101,15 @@ struct pca955x_chipdef { >>>> }; >>>> MODULE_DEVICE_TABLE(i2c, pca955x_id); >>>> >>>> +static const struct acpi_device_id pca955x_acpi_ids[] = { >>>> + { .id = "PCA9550", .driver_data = pca9550 }, >>>> + { .id = "PCA9551", .driver_data = pca9551 }, >>>> + { .id = "PCA9552", .driver_data = pca9552 }, >>>> + { .id = "PCA9553", .driver_data = pca9553 }, >>>> + { } >> >> >> OK, I see that you brought back explicit properties in the >> structure initializer. Is there some vital reason for that? >> You're mentioning "correcting coding conventions" in the >> patch changelog. checkpatch.pl --strict doesn't complain about >> that, so what coding conventions you have on mind? > > >> >> >>>> +MODULE_DEVICE_TABLE(acpi, pca955x_acpi_ids); >>>> + >>>> struct pca955x { >>>> struct mutex lock; >>>> struct pca955x_led *leds; >>>> @@ -250,7 +260,16 @@ static int pca955x_probe(struct i2c_client *client, >>>> struct led_platform_data *pdata; >>>> int i, err; >>>> >>>> - chip = &pca955x_chipdefs[id->driver_data]; >>>> + if (id) { >>>> + chip = &pca955x_chipdefs[id->driver_data]; >>>> + } else { >>>> + const struct acpi_device_id *acpi_id; > > I added '{}' follow if You had it already in V1. Please verify if the patch applied to the for-next branch of linux-leds.git has the shape you intended: https://git.kernel.org/cgit/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=e46895b71a26da404c4d95cb2bab1a67cf8b20bc -- Best regards, Jacek Anaszewski