Re: [PATCH v2 5/6] regulator: max77843: Add max77843 regulator driver

From: Jaewon Kim
Date: Tue Feb 03 2015 - 20:38:02 EST


Hi Mark,

2015ë 02ì 04ì 01:25ì Mark Brown ì(ê) ì ê:
On Tue, Feb 03, 2015 at 02:04:05PM +0900, Jaewon Kim wrote:
This patch adds new regulator driver to support max77843
MFD(Multi Function Device) chip`s regulators.
The Max77843 has two voltage regulators for USB safeout.
This looks mostly good, a couple of very small things:

+static const struct regulator_desc max77843_supported_regulators[] = {
+ [MAX77843_SAFEOUT1] = {
+ .name = "SAFEOUT1",
+ .id = MAX77843_SAFEOUT1,
+ .ops = &max77843_regulator_ops,
+ .of_match = of_match_ptr("SAFEOUT1"),
+ .regulators_node = of_match_ptr("regulators"),
+ .type = REGULATOR_VOLTAGE,
+ .owner = THIS_MODULE,
+ .n_voltages = MAX77843_SUPPORTED_VOLTAGE_NUM,
+ .volt_table = max77843_regulator_table,
It's better to make n_voltages be ARRAY_SIZE() for the table, that way
there's no need to keep the define and array lined up if someone extends
the driver. A name like _safeout_voltage_table might be clearer too.

I will change n_voltages value to ARRAY_SIZE() instead of define.
And fix volt_table enum variable name.
Thanks to advise.

Thanks
Jaewon Kim
--
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/