From: Mark Brown <broonie@kernel.org>
To: Mehar Bajwa <mehar.bajwa@ti.com>
Cc: linux-kernel@vger.kernel.org, sameo@linux.intel.com,
liam.r.girdwood@intel.com, navada@ti.com
Subject: Re: [PATCH V2 1/4] mfd: Initial support for Texas Instruments AIC family of CODECs
Date: Wed, 1 May 2013 16:43:46 +0100 [thread overview]
Message-ID: <20130501154346.GO26160@sirena.org.uk> (raw)
In-Reply-To: <1366119816-9719-1-git-send-email-mehar.bajwa@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
On Tue, Apr 16, 2013 at 07:13:36PM +0530, Mehar Bajwa wrote:
> +/**
> + * set_aic_book: change book which we have to write/read to.
> + *
> + * @aic: Device to write/read to.
> + * @book: Book to write/read to.
> + */
> +int set_aic_book(struct aic *aic, int book)
> +{
> + int ret = 0;
> + u8 page_buf[] = { 0x0, 0x0 };
> + u8 book_buf[] = { 0x7f, 0x0 };
> +
> + ret = regmap_write(aic->regmap, page_buf[0], page_buf[1]);
> +
> + if (ret < 0)
> + return ret;
> + book_buf[1] = book;
> + ret = regmap_write(aic->regmap, book_buf[0], book_buf[1]);
This looks like just like register paging - there's support in the core
for that, if it's not adequate then just extend the framework. Looks
like the pages are multi-level so perhaps that's required.
> + dev_info(aic->dev, "%s\n", devname);
It's useful to display something like a device revision but if you're
just announcing that the driver has been loaded that's not so useful and
should be removed. Similarly for the others.
> +#ifdef CONFIG_MFD_AIC_IRQ
> + if (aic->irq) {
> + ret = aic_irq_init(aic);
> + if (ret < 0)
> + goto err_irq;
> + }
> +#endif
This doesn't look like it should be a config option? If it should be
then these should be done with inline functions in the headers for stubs
rather than ifdefs in the code.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-05-01 15:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 13:43 Mehar Bajwa
2013-04-16 13:44 ` [PATCH V2 2/4] mfd: Interrupt handling support for AIC family Mehar Bajwa
2013-04-16 13:44 ` [PATCH V2 3/4] mfd: I2C interface with AIC platform Mehar Bajwa
2013-04-16 13:45 ` [PATCH V2 4/4] mfd: SPI " Mehar Bajwa
2013-05-01 15:47 ` [PATCH V2 3/4] mfd: I2C " Mark Brown
2013-05-01 15:46 ` [PATCH V2 2/4] mfd: Interrupt handling support for AIC family Mark Brown
2013-05-01 15:43 ` Mark Brown [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=20130501154346.GO26160@sirena.org.uk \
--to=broonie@kernel.org \
--cc=liam.r.girdwood@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mehar.bajwa@ti.com \
--cc=navada@ti.com \
--cc=sameo@linux.intel.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
all inboxes | Powered by JetHome®