Re: [PATCH v3] regulator, dt: add dt support for tps6502x regulator
On Tue, Oct 27, 2015 at 07:23:09AM +0100, Heiko Schocher wrote: > Am 27.10.2015 um 03:12 schrieb Mark Brown: > >Please use subject lines matching the style for the subsystem. > Would be "regulator: tps6520x:" correct? Yes. > >>+ regulators = of_get_child_by_name(np, "regulators"); > >>+ if (!regulators) { > >>+ dev_err(dev, "regulator node not found\n"); > >>+ return NULL; > >>+ } > >Please use the generic support for locating the DT information for > >regulators using regulators_node and of_match in the regulator_desc > >rather than open coding this. > Hmm.. could you point me to a correct example? Seems I overlook sth. $ grep -l regulators_node drivers/regulator/*.c drivers/regulator/88pm800.c drivers/regulator/axp20x-regulator.c drivers/regulator/da9062-regulator.c drivers/regulator/isl9305.c drivers/regulator/max14577.c drivers/regulator/max77686.c drivers/regulator/max77693.c drivers/regulator/max77802.c drivers/regulator/mt6311-regulator.c drivers/regulator/of_regulator.c drivers/regulator/rn5t618-regulator.c drivers/regulator/rt5033-regulator.c drivers/regulator/sky81452-regulator.c drivers/regulator/tps65217-regulator.c signature.asc Description: PGP signature
Re: [PATCH v3] regulator, dt: add dt support for tps6502x regulator
Hello Mark, Am 27.10.2015 um 03:12 schrieb Mark Brown: On Mon, Oct 26, 2015 at 12:25:17PM +0100, Heiko Schocher wrote: add DT support for the tps6502x regulators. Please use subject lines matching the style for the subsystem. Would be "regulator: tps6520x:" correct? + regulators = of_get_child_by_name(np, "regulators"); + if (!regulators) { + dev_err(dev, "regulator node not found\n"); + return NULL; + } Please use the generic support for locating the DT information for regulators using regulators_node and of_match in the regulator_desc rather than open coding this. Hmm.. could you point me to a correct example? Seems I overlook sth. drivers/regulator/tps65090-regulator.c drivers/regulator/tps65910-regulator.c drivers/regulator/tps6507x-regulator.c drivers/regulator/tps6586x-regulator.c are doing it all the same way ... bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3] regulator, dt: add dt support for tps6502x regulator
On Tue, Oct 27, 2015 at 07:23:09AM +0100, Heiko Schocher wrote: > Am 27.10.2015 um 03:12 schrieb Mark Brown: > >Please use subject lines matching the style for the subsystem. > Would be "regulator: tps6520x:" correct? Yes. > >>+ regulators = of_get_child_by_name(np, "regulators"); > >>+ if (!regulators) { > >>+ dev_err(dev, "regulator node not found\n"); > >>+ return NULL; > >>+ } > >Please use the generic support for locating the DT information for > >regulators using regulators_node and of_match in the regulator_desc > >rather than open coding this. > Hmm.. could you point me to a correct example? Seems I overlook sth. $ grep -l regulators_node drivers/regulator/*.c drivers/regulator/88pm800.c drivers/regulator/axp20x-regulator.c drivers/regulator/da9062-regulator.c drivers/regulator/isl9305.c drivers/regulator/max14577.c drivers/regulator/max77686.c drivers/regulator/max77693.c drivers/regulator/max77802.c drivers/regulator/mt6311-regulator.c drivers/regulator/of_regulator.c drivers/regulator/rn5t618-regulator.c drivers/regulator/rt5033-regulator.c drivers/regulator/sky81452-regulator.c drivers/regulator/tps65217-regulator.c signature.asc Description: PGP signature
Re: [PATCH v3] regulator, dt: add dt support for tps6502x regulator
Hello Mark, Am 27.10.2015 um 03:12 schrieb Mark Brown: On Mon, Oct 26, 2015 at 12:25:17PM +0100, Heiko Schocher wrote: add DT support for the tps6502x regulators. Please use subject lines matching the style for the subsystem. Would be "regulator: tps6520x:" correct? + regulators = of_get_child_by_name(np, "regulators"); + if (!regulators) { + dev_err(dev, "regulator node not found\n"); + return NULL; + } Please use the generic support for locating the DT information for regulators using regulators_node and of_match in the regulator_desc rather than open coding this. Hmm.. could you point me to a correct example? Seems I overlook sth. drivers/regulator/tps65090-regulator.c drivers/regulator/tps65910-regulator.c drivers/regulator/tps6507x-regulator.c drivers/regulator/tps6586x-regulator.c are doing it all the same way ... bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v3] regulator, dt: add dt support for tps6502x regulator
On Mon, Oct 26, 2015 at 12:25:17PM +0100, Heiko Schocher wrote: > add DT support for the tps6502x regulators. Please use subject lines matching the style for the subsystem. > + regulators = of_get_child_by_name(np, "regulators"); > + if (!regulators) { > + dev_err(dev, "regulator node not found\n"); > + return NULL; > + } Please use the generic support for locating the DT information for regulators using regulators_node and of_match in the regulator_desc rather than open coding this. signature.asc Description: PGP signature
Re: [PATCH v3] regulator, dt: add dt support for tps6502x regulator
On Mon, Oct 26, 2015 at 12:25:17PM +0100, Heiko Schocher wrote: > add DT support for the tps6502x regulators. Please use subject lines matching the style for the subsystem. > + regulators = of_get_child_by_name(np, "regulators"); > + if (!regulators) { > + dev_err(dev, "regulator node not found\n"); > + return NULL; > + } Please use the generic support for locating the DT information for regulators using regulators_node and of_match in the regulator_desc rather than open coding this. signature.asc Description: PGP signature