Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422901AbbD2QBM (ORCPT ); Wed, 29 Apr 2015 12:01:12 -0400 Received: from mail1.bemta3.messagelabs.com ([195.245.230.170]:7149 "EHLO mail1.bemta3.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965843AbbD2QBH (ORCPT ); Wed, 29 Apr 2015 12:01:07 -0400 X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-15.tower-39.messagelabs.com!1430323264!26409121!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 6.13.6; banners=-,-,- X-VirusChecked: Checked From: "Opensource [Steve Twiss]" To: Lee Jones , "Opensource [Steve Twiss]" CC: Dmitry Torokhov , Samuel Ortiz , DT , David Dajun Chen , INPUT , Ian Campbell , Kumar Gala , LKML , Mark Rutland , "Pawel Moll" , Rob Herring , "Support Opensource" Subject: RE: [RESEND PATCH V2 1/2] input: misc: da9063: OnKey driver Thread-Topic: [RESEND PATCH V2 1/2] input: misc: da9063: OnKey driver Thread-Index: AQHQeQfMnVUuHbQ18kSdUM3dz+iX5J1iUeiAgAHEIrA= Date: Wed, 29 Apr 2015 16:01:03 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7014B217B51@SW-EX-MBX02.diasemi.com> References: <20150428115631.GA9169@x1> In-Reply-To: <20150428115631.GA9169@x1> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.77] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t3TG1JQK027429 Content-Length: 2561 Lines: 81 On 28 April 2015 12:57 Lee Jones [mailto:lee.jones@linaro.org] wrote: > On Fri, 17 Apr 2015, S Twiss wrote: > > ++++++++++++++++++++++++++++++++++++++ > > drivers/mfd/da9063-core.c | 55 +++++++++ > > include/linux/mfd/da9063/pdata.h | 1 + > > This should be a seperate patch. > Okay, done this now. Added a new PATCH 3/3 > > static struct resource da9063_onkey_resources[] = { > > { > > + .name = "ONKEY", > > .start = DA9063_IRQ_ONKEY, > > .end = DA9063_IRQ_ONKEY, > > .flags = IORESOURCE_IRQ, > > @@ -97,6 +98,7 @@ static const struct mfd_cell da9063_devs[] = { > > .name = DA9063_DRVNAME_ONKEY, > > .num_resources = > ARRAY_SIZE(da9063_onkey_resources), > > .resources = da9063_onkey_resources, > > + .of_compatible = "dlg,da9063-onkey", > > }, > > { > > .name = DA9063_DRVNAME_RTC, > > This is lowercase, so why does "ONKEY" have to be uppercase? > No real reason why this is uppercase in favour of lowercase except it is following the convention of the existing DA9063 driver code. Currently the DA9063 uses uppercase for its naming, there are several others components that use the same uppercase convention, e.g. the RTC alarm and tick interrupt and the hardware LDO limit: > cat /proc/interrupts | grep 9063 384: 0 0 0 0 da9063-irq 0 ONKEY 385: 0 2 0 0 da9063-irq 1 ALARM 387: 0 30 0 0 da9063-irq 3 HWMON 392: 0 0 0 0 da9063-irq 8 LDO_LIM I was going to leave this uppercase, but I can easily change it if this is necessary. > > if (ret) > > dev_err(da9063->dev, "Cannot add MFD cells\n"); > > > > + > > Tut tut! > > > return ret; > > } I've changed that to remove the lazy fall-through on the error path. It now has the following form: @@ -229,9 +229,10 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq) ret = mfd_add_devices(da9063->dev, -1, da9063_devs, ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base, NULL); - if (ret) + if (ret) { dev_err(da9063->dev, "Cannot add MFD cells\n"); - + return ret; + } return ret; } Thanks for the review comments. The next patch set for DA9063 will follow shortly. Regards, Steve ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?