devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: "Opensource [Steve Twiss]" <stwiss.opensource@diasemi.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	DT <devicetree@vger.kernel.org>,
	David Dajun Chen <david.chen@diasemi.com>,
	INPUT <linux-input@vger.kernel.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>,
	Support Opensource <Support.Opensource@diasemi.com>
Subject: Re: [RESEND PATCH V2 1/2] input: misc: da9063: OnKey driver
Date: Wed, 29 Apr 2015 17:15:28 +0100	[thread overview]
Message-ID: <20150429161528.GZ9169@x1> (raw)
In-Reply-To: <6ED8E3B22081A4459DAC7699F3695FB7014B217B51@SW-EX-MBX02.diasemi.com>

On Wed, 29 Apr 2015, Opensource [Steve Twiss] wrote:

> 
> 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;
>  }

Sorry, that's not what I meant.

The fall-through is perfectly fine.  I was tutting because you added
an unrelated 'clean-up'.

> Thanks for the review comments.
> The next patch set for DA9063 will follow shortly.
> 
> Regards,
> Steve

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2015-04-29 16:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 12:03 [RESEND PATCH V2 0/2] Add OnKey support for DA9063 S Twiss
2015-04-17 12:03 ` [RESEND PATCH V2 2/2] devicetree: Add bindings for DA9063 OnKey S Twiss
2015-04-17 12:03 ` [RESEND PATCH V2 1/2] input: misc: da9063: OnKey driver S Twiss
2015-04-17 16:15   ` Dmitry Torokhov
2015-04-24 13:36     ` Opensource [Steve Twiss]
2015-04-29 16:00     ` Opensource [Steve Twiss]
     [not found]   ` <b9068c6e41a08b620c9e1674e17e508ab0d76d55.1429272200.git.stwiss.opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2015-04-18  7:55     ` Paul Bolle
2015-04-24 13:45       ` Opensource [Steve Twiss]
2015-04-24 16:53         ` Paul Bolle
2015-04-28 11:56   ` Lee Jones
2015-04-29 16:01     ` Opensource [Steve Twiss]
2015-04-29 16:15       ` Lee Jones [this message]

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=20150429161528.GZ9169@x1 \
    --to=lee.jones@linaro.org \
    --cc=Support.Opensource@diasemi.com \
    --cc=david.chen@diasemi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=stwiss.opensource@diasemi.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).