Re: [PATCH 17/17] ARM: shmobile: lager: use gpio/fixed regulator for SDHI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent

Thank you for your feedback

> > +/* SDHI regulator macro */
> > +#define SDHI_REGULATOR(idx, vdd_pin, vccq_pin)				\
> > +static struct regulator_consumer_supply vcc_sdhi##idx##_consumer =	\
> > +	REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx);		\
> > +									\
> > +static struct regulator_init_data vcc_sdhi##idx##_init_data = {		\
> > +	.constraints = {						\
> > +		.valid_ops_mask = REGULATOR_CHANGE_STATUS,		\
> > +	},								\
> > +	.consumer_supplies	= &vcc_sdhi##idx##_consumer,		\
> > +	.num_consumer_supplies	= 1,					\
> > +};									\
> > +									\
> > +static struct fixed_voltage_config vcc_sdhi##idx##_info = {		\
> > +	.supply_name	= "SDHI" #idx "Vcc",				\
> > +	.microvolts	= 3300000,					\
> > +	.gpio		= vdd_pin,					\
> > +	.enable_high	= 1,						\
> > +	.init_data	= &vcc_sdhi##idx##_init_data,			\
> > +};									\
> > +									\
> > +static struct regulator_consumer_supply vccq_sdhi##idx##_consumer=	\
> > +	REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi." #idx);		\
> > +									\
> > +static struct regulator_init_data vccq_sdhi##idx##_init_data = {	\
> > +	.constraints = {						\
> > +		.input_uV	= 3300000,				\
> > +		.min_uV		= 1800000,				\
> > +		.max_uV		= 3300000,				\
> > +		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |		\
> > +				  REGULATOR_CHANGE_STATUS,		\
> > +	},								\
> > +	.consumer_supplies	= &vccq_sdhi##idx##_consumer,		\
> > +	.num_consumer_supplies	= 1,					\
> > +};									\
> > +									\
> > +static struct gpio vccq_sdhi##idx##_gpio =				\
> > +	{ vccq_pin, GPIOF_OUT_INIT_HIGH, "vccq-sdhi" #idx };		\
> > +									\
> > +static struct gpio_regulator_state vccq_sdhi##idx##_states[] = {	\
> > +	{ .value = 1800000, .gpios = 0 },				\
> > +	{ .value = 3300000, .gpios = 1 },				\
> > +};									\
> > +									\
> > +static struct gpio_regulator_config vccq_sdhi##idx##_info = {		\
> > +	.supply_name	= "vqmmc",					\
> > +	.gpios		= &vccq_sdhi##idx##_gpio,			\
> > +	.nr_gpios	= 1,						\
> > +	.states		= vccq_sdhi##idx##_states,			\
> > +	.nr_states	= ARRAY_SIZE(vccq_sdhi##idx##_states),		\
> > +	.type		= REGULATOR_VOLTAGE,				\
> > +	.init_data	= &vccq_sdhi##idx##_init_data,			\
> > +};
> 
> The vmmc regulator looks fine to me at first sight, but I'm less sure about 
> the vqmmc regulator. The vqmmc supplies are provided by the PMIC, we should 
> ideally use the existing da9063 mfd driver. As this might require a 
> significant amount of work I'm fine with this approach as a quick fix, but I'd 
> like a comment in the source code stating that vqmmc should be handled by the 
> da9063 driver.

Nice catch.
I agree. will do in v2 patch

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux