Re: [PATCH v2 1/5] mfd: Add S5M core driver

From: Mark Brown
Date: Sat Dec 24 2011 - 13:41:47 EST


On Fri, Dec 23, 2011 at 05:28:08PM +0900, Sangbeom Kim wrote:
> S5M series are pmic including mutiple functional devices.
> It can support PMIC, RTC, Battery charger, codec.
> This patch implement core driver for s5m series.

Reviewed-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

Looking good - a few nits that could be fixed incrementally unless
there's some reason to resend.

> +static struct regmap_config s5m_regmap_config = {
> + .reg_bits = 8,
> + .val_bits = 8,
> +};

It would be worth considering turning on the register cache support - it
can provide a nice performance win for read/modify/write operations by
cutting out the read from hardware. You don't need to provide any
defaults.

> + s5m87xx = kzalloc(sizeof(struct s5m87xx_dev), GFP_KERNEL);
> + if (s5m87xx == NULL)
> + return -ENOMEM;

devm_kzalloc() saves error handling and cleanup code.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/