From: Mark Brown <broonie@kernel.org>
To: Florian Lobmaier <florian.lobmaier@ams.com>
Cc: linux-kernel@vger.kernel.org, sameo@linux.intel.com,
lee.jones@linaro.org
Subject: Re: [PATCH 1/4] added support for ams AS3722 PMIC in mfd
Date: Wed, 14 Aug 2013 16:27:50 +0100 [thread overview]
Message-ID: <20130814152750.GS6427@sirena.org.uk> (raw)
In-Reply-To: <1376492098-15672-1-git-send-email-florian.lobmaier@ams.com>
[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]
On Wed, Aug 14, 2013 at 04:54:55PM +0200, Florian Lobmaier wrote:
> +static struct regmap_irq_chip as3722_irq_chip = {
> + .name = "as3722",
> + .irqs = as3722_irqs,
> + .num_irqs = ARRAY_SIZE(as3722_irqs),
> + .num_regs = 4,
> + .status_base = AS3722_INTERRUPTSTATUS1_REG,
> + .mask_base = AS3722_INTERRUPTMASK1_REG,
> + .wake_base = 1,
> +};
wake_base looks wrong - that should be either absent or a register name.
> +static void as3722_reg_init(struct as3722 *as3722,
> + struct as3722_reg_init *reg_data)
> +{
> + int ret;
> +
> + while (reg_data->reg != AS3722_REG_INIT_TERMINATE) {
> + ret = as3722_reg_write(as3722, reg_data->reg, reg_data->val);
> + if (ret) {
> + dev_err(as3722->dev,
> + "reg setup failed: %d\n", ret);
> + return;
> + }
> + reg_data++;
> + }
> +}
This looks like it might be supposed to be a register patch?
> +int as3722_read_adc(struct as3722 *as3722,
> + enum as3722_adc_channel channel,
> + enum as3722_adc_source source,
> + enum as3722_adc_voltange_range voltage_range)
This should be moved over to IIO - the ADC code in MFDs predates IIO
being available.
> +static irqreturn_t as3722_onkey_press_irq(int irq, void *irq_data)
> +static irqreturn_t as3722_onkey_lpress_irq(int irq, void *irq_data)
These should be handled by an input driver.
> +static irqreturn_t as3722_temp_sd0_shutdown_irq(int irq, void *irq_data)
> +{
> + struct as3722 *as3722 = irq_data;
> +
> + dev_dbg(as3722->dev, "AS3722 temp SD0 shutdown triggered\n");
> + return IRQ_HANDLED;
> +}
You probably want these to complain loudly rather than as dev_dbg(), I'm
not sure what the status of the thermal framework is.
> + /* enable 32kHz clock output if required */
> + if (pdata->enable_clk32out_pin)
> + as3722_set_bits(as3722, AS3722_RTC_CONTROL_REG,
> + AS3722_CLK32OUT_ENABLE_MASK,
> + AS3722_CLK32OUT_ENABLE_ON);
> + else
> + as3722_set_bits(as3722, AS3722_RTC_CONTROL_REG,
> + AS3722_CLK32OUT_ENABLE_MASK,
> + AS3722_CLK32OUT_ENABLE_OFF);
This looks like a job for the clk API.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-08-14 15:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 14:54 [PATCH 1/4] added support for ams AS3722 PMIC in mfd Florian Lobmaier
2013-08-14 14:54 ` [PATCH 2/4] added regmap of AS3722 Florian Lobmaier
2013-08-14 15:29 ` Mark Brown
2013-08-14 14:54 ` [PATCH 3/4] added AS3722 platform include file Florian Lobmaier
2013-08-14 14:54 ` [PATCH 4/4] added ams AS3722 register " Florian Lobmaier
2013-08-14 15:33 ` Lee Jones
2013-08-14 15:27 ` [PATCH 1/4] added support for ams AS3722 PMIC in mfd Lee Jones
2013-08-14 15:27 ` 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=20130814152750.GS6427@sirena.org.uk \
--to=broonie@kernel.org \
--cc=florian.lobmaier@ams.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--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