Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1432116

Re: [PATCH v2 04/14] regulator: SY8106A regulator driver

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 04/14] regulator: SY8106A regulator driver
Date 2016-06-27 17:20 +0200
Message-ID <rOGul-20Y-7@gated-at.bofh.it> (permalink)
References <rNMLw-lT-3@gated-at.bofh.it> <rNMLw-lT-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sat, Jun 25, 2016 at 05:45:01AM +0200, megous@megous.com wrote:

> +	config.init_data = of_get_regulator_init_data(dev, dev->of_node, &sy8106a_reg);
> +	if (!config.init_data) {
> +		return -EINVAL;
> +	}

This is broken, constraints are entirely optional - the driver should
just instantiate no matter what (if anything) the constraints are.  This
means people can read the current state even if there is no need for
runtime configuration.

> +	dev_info(&i2c->dev, "SY8106A voltage at boot: %u mV\n", SY8106A_MIN_MV + 
> +		 SY8106A_STEP_MV * (selector & SY8106A_REG_VOUT1_SEL_MASK));

This is just noise, remove it - if we want to list the voltage for
regulators at probe we should be doing it consistently for all
regulators in the core rather than in individual drivers.

> +/*
> + * This is useless for OF-enabled devices, but it is needed by I2C subsystem
> + */
> +static const struct i2c_device_id sy8106a_i2c_id[] = {
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id);

No, this is not the case - supporting DT does not mean that other
enumeration mechanisms can't be supported and there's no reason not to
list a sensible ID here.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 04/14] regulator: SY8106A regulator driver megous@megous.com - 2016-06-25 05:50 +0200
  Re: [PATCH v2 04/14] regulator: SY8106A regulator driver Mark Brown <broonie@kernel.org> - 2016-06-26 13:30 +0200
    Re: [PATCH v2 04/14] regulator: SY8106A regulator driver Ondřej Jirman <megous@megous.com> - 2016-06-26 17:10 +0200
      Re: [PATCH v2 04/14] regulator: SY8106A regulator driver Mark Brown <broonie@kernel.org> - 2016-06-27 17:00 +0200
        Re: [PATCH v2 04/14] regulator: SY8106A regulator driver Ondřej Jirman <megous@megous.com> - 2016-06-28 18:30 +0200
  Re: [PATCH v2 04/14] regulator: SY8106A regulator driver Mark Brown <broonie@kernel.org> - 2016-06-27 17:20 +0200

csiph-web