[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111212044437.GB2806@opensource.wolfsonmicro.com>
Date: Mon, 12 Dec 2011 12:44:38 +0800
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Ashish Jangam <ashish.jangam@...tcummins.com>
Cc: linux-kernel@...r.kernel.org, Dajun <dajun.chen@...semi.com>,
linaro-dev@...ts.linaro.org, arnd@...db.de, eric.miao@...aro.org
Subject: Re: [PATCH 01/06] MFD: DA9052/53 MFD core module v9
On Fri, Dec 09, 2011 at 07:45:44PM +0530, Ashish Jangam wrote:
> The DA9052/53 is a highly integrated PMIC subsystem with supply domain
> flexibility to support wide range of high performance application.
This looks pretty good now. There's a few issues below but with those
corrected the driver looks good.
Reviewed-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
> +int da9052_add_regulator_devices(struct da9052 *da9052)
> +{
> + struct platform_device *pdev;
> + int i, ret;
> +
> + for (i = 0; i < DA9052_MAX_REGULATORS; i++) {
> + pdev = platform_device_alloc("da9052-regulator", i);
> + if (!pdev)
> + return -ENOMEM;
> +
> + pdev->dev.parent = da9052->dev;
> + ret = platform_device_add(pdev);
> + if (ret) {
> + platform_device_put(pdev);
> + return ret;
> + }
> + }
Same comment as ever about these - just make them normal MFD children.
> + if (!pdata && !pdata->irq_base)
> + da9052->irq_base = -1;
The above should be || not && - you want to set irq_base to -1 if you
don't have one provided.
> +static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg,
> + unsigned char bit_mask,
> + unsigned char reg_val)
> +{
> + if (reg > DA9052_MAX_REG_CNT) {
> + dev_err(da9052->dev, "invalid reg %x\n", reg);
> + return -EINVAL;
> + }
regmap will do this for you if you tell it max_register, this will also
get you the ability to inspect the device registers via debugfs which
can be very helpful. I'd also encourage you to enable cache support, it
should make system performance better.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists