Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1706887
| From | Hans de Goede <hdegoede@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 13/18] power: supply: bq24190_charger: Export 5V boost converter as regulator |
| Date | 2017-08-08 23:10 +0200 |
| Message-ID | <ucjVf-5LR-7@gated-at.bofh.it> (permalink) |
| References | <ubt0C-2al-7@gated-at.bofh.it> <ubt0E-2al-67@gated-at.bofh.it> <uc8n8-5sU-11@gated-at.bofh.it> <uc8Gu-5Tu-17@gated-at.bofh.it> <uchTs-3SV-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi, On 08/08/2017 08:57 PM, Liam Breck wrote: > On Tue, Aug 8, 2017 at 2:00 AM, Hans de Goede <hdegoede@redhat.com> wrote: >> Hi, >> >> On 08-08-17 10:39, Liam Breck wrote: >>> >>> Hi Hans, >>> >>> On Sun, Aug 6, 2017 at 5:35 AM, Hans de Goede <hdegoede@redhat.com> wrote: >>>> >>>> Register the 5V boost converter as a regulator named >>>> "regulator-bq24190-usb-vbus". Note the name includes "bq24190" because >>>> the bq24190 family is also used on ACPI devices where there are no >>>> device-tree phandles, so regulator_get will fallback to the name and thus >>>> it must be unique on the system. >>> >>> >>> What we're enabling here is 5V boost for otg host mode, not vbus >>> generally, so maybe the name should indicate that... >>> >>> regulator-bq24190-usb-5volt >>> regulator-bq24190-usb-host >>> regulator-bq24190-usb-otg-5v >> >> >> I picked vbus because that gets used a lot already in similar cases, >> but I agree that we should probably come up with a better name. >> >> I like "regulator-bq24190-usb-otg-5v", shall I use that for v2? > > There is this upstream, with "otg-vbus": > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=61274eff0ddee8f10deaa5f79085e981db52930a > > Related search: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/?qt=grep&q=otg+regulator > > I don't think it needs a "regulator-" prefix, and maybe the driver > name is a suffix. We could also recommend the "regulator-name" value > for OTG here: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/devicetree/bindings/regulator/regulator.txt > > a. Make the above patch wrong :-) > usb-otg-5v (generic) > usb-otg-5v-bq2419x (specific) > > b. Follow a weak precedent > otg-vbus (generic) > otg-vbus-bq2419x (specific) Looking at dts files under arch/arm/boot/dts the most used name seems to be usb_otg_vbus (with underscores) so I will use that for v2 of this patch. As for making the name more specific, as Mark Brown has correctly pointed out the right thing to do on x86 is to add a mapping for the consumer of the regulator using regulator_init_data, which can be passed through platform_data (and I do control the i2c_client instantiation on x86, so adding that is easy), which means that we can keep the name generic, which is a much better solution then relying on the name. This means that we can keep the name generic as one normally does for a regulator-name. Regards, Hans
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/18] Hookup typec power-negotation to the PMIC and charger Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
[PATCH 12/18] power: supply: Add power_supply_set_input_current_limit_from_supplier helper Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
[PATCH 13/18] power: supply: bq24190_charger: Export 5V boost converter as regulator Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
Re: [PATCH 13/18] power: supply: bq24190_charger: Export 5V boost converter as regulator Tony Lindgren <tony@atomide.com> - 2017-08-08 06:20 +0200
Re: [PATCH 13/18] power: supply: bq24190_charger: Export 5V boost converter as regulator Liam Breck <liam@networkimprov.net> - 2017-08-08 10:50 +0200
Re: [PATCH 13/18] power: supply: bq24190_charger: Export 5V boost converter as regulator Hans de Goede <hdegoede@redhat.com> - 2017-08-08 11:10 +0200
Re: [PATCH 13/18] power: supply: bq24190_charger: Export 5V boost converter as regulator Liam Breck <liam@networkimprov.net> - 2017-08-08 21:00 +0200
Re: [PATCH 13/18] power: supply: bq24190_charger: Export 5V boost converter as regulator Hans de Goede <hdegoede@redhat.com> - 2017-08-08 23:10 +0200
[PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Guenter Roeck <linux@roeck-us.net> - 2017-08-06 16:40 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Hans de Goede <hdegoede@redhat.com> - 2017-08-06 17:00 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Guenter Roeck <linux@roeck-us.net> - 2017-08-06 17:30 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Hans de Goede <hdegoede@redhat.com> - 2017-08-06 17:50 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Mark Brown <broonie@kernel.org> - 2017-08-07 13:20 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Hans de Goede <hdegoede@redhat.com> - 2017-08-07 16:50 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Mark Brown <broonie@kernel.org> - 2017-08-07 17:50 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Hans de Goede <hdegoede@redhat.com> - 2017-08-07 21:30 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Mark Brown <broonie@kernel.org> - 2017-08-08 11:50 +0200
Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property Hans de Goede <hdegoede@redhat.com> - 2017-08-08 23:00 +0200
[PATCH 14/18] power: supply: bq24190_charger: Add input_current_limit property Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
[PATCH 09/18] staging: typec: fusb302: Use tcpm_set_current_limit_psy Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
Re: [PATCH 09/18] staging: typec: fusb302: Use tcpm_set_current_limit_psy Guenter Roeck <linux@roeck-us.net> - 2017-08-06 16:30 +0200
[PATCH 05/18] staging: typec: fusb302: Set max supply voltage to 5V Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
[PATCH 03/18] staging: typec: tcpm: Split tcpm code into tcpm-core.c and tcpm-helpers.c Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:40 +0200
[PATCH 02/18] staging: typec: tcpm: Add extcon helper functions for USB2 current limit detect Hans de Goede <hdegoede@redhat.com> - 2017-08-06 14:50 +0200
Re: [PATCH 02/18] staging: typec: tcpm: Add extcon helper functions for USB2 current limit detect Guenter Roeck <linux@roeck-us.net> - 2017-08-06 16:10 +0200
csiph-web