All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add I2C driver for Summit Microelectronics SMB347 Battery Charger.
Date: Wed, 14 Mar 2012 03:46:56 +0400	[thread overview]
Message-ID: <20120313234656.GA1778@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20120206160127.GF10173@sirena.org.uk>

On Mon, Feb 06, 2012 at 04:01:27PM +0000, Mark Brown wrote:
> On Mon, Feb 06, 2012 at 03:59:01PM +0000, Alan Cox wrote:
> 
> > Driver support for the Summit I??C battery charger. This is used in some
> > Intel devices.
> 
> There's quite a lot of read/modify/write cycles and...
> 
> > +static int smb347_debugfs_show(struct seq_file *s, void *data)
> > +{
> > +	struct smb347_charger *smb = s->private;
> > +	int ret;
> > +	u8 reg;
> > +
> > +	seq_printf(s, "Control registers:\n");
> > +	seq_printf(s, "==================\n");
> 
> ...this which make me wonder if this might not benefit from using
> regmap.  The read/modify/write cycles are handled by regmap_update_bits()
> and there's a standard debugfs file for dumping registers.  Should save
> a bit of code I think but I'd not worry too much either way.
> 
> > +static int __init smb347_init(void)
> > +{
> > +	return i2c_add_driver(&smb347_driver);
> > +}
> > +module_init(smb347_init);
> > +
> > +static void __exit smb347_exit(void)
> > +{
> > +	i2c_del_driver(&smb347_driver);
> > +}
> > +module_exit(smb347_exit);
> 
> There's module_i2c_driver() (and similarly for SPI and platform) though
> that's definitely a nitpick.

I agree with all these comments. There wasn't any update on this
patch though. But it compiles and hopefully works, so I'm applying it
w/ some lingering hope that it'll receive attention from the submitter. :-)

Thanks!

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

      parent reply	other threads:[~2012-03-13 23:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 15:59 [PATCH] Add I2C driver for Summit Microelectronics SMB347 Battery Charger Alan Cox
2012-02-06 16:01 ` Mark Brown
2012-02-06 16:24   ` Alan Cox
2012-02-06 16:35     ` Mark Brown
2012-02-06 17:05       ` Alan Cox
2012-02-06 17:21         ` Mark Brown
2012-03-13 23:46   ` Anton Vorontsov [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=20120313234656.GA1778@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.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.