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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html