Re: [PATCH] regulator: Add S5M8767 regulator driver

From: Mark Brown
Date: Sun Oct 23 2011 - 05:30:23 EST


On Sun, Oct 23, 2011 at 05:12:27PM +0900, Sangbeom Kim wrote:

This mostly looks good, a few smaller comments below but nothing major.

> +static int s5m8767_reg_enable_suspend(struct regulator_dev *rdev)
> +{
> + return 0;
> +}

> +static int s5m8767_reg_disable_suspend(struct regulator_dev *rdev)
> +{

I guess you need an implementation for enable_suspend() (otherwise you
can't do disable->enable).

> + {
> + .name = "AP 32KHz",
> + .id = S5M8767_32KHZAP_EN,
> + .ops = &s5m8767_others_ops,
> + .type = REGULATOR_VOLTAGE,
> + .owner = THIS_MODULE,
> + }, {
> + .name = "CP 32KHz",
> + .id = S5M8767_32KHZAP_EN,
> + .ops = &s5m8767_others_ops,
> + .type = REGULATOR_VOLTAGE,
> + .owner = THIS_MODULE,
> + },

Do these actually share anything with the other regulators? If not then
I guess it's better to do with the struct clk framework.

> + if (!pdata) {
> + dev_err(pdev->dev.parent, "Platform data not supplied\n");
> + return -ENODEV;
> + }

It should be possible to register without platform data now (giving
readback only support). Older versions of the regulator API required
constraints.

> + dev_warn(&pdev->dev, "Duplicated gpio
> request"
> + " for SET3\n");

Please keep the strings on one line (it makes grepping for errors
easier).
--
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/