Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508187

Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent

From Sekhar Nori <nsekhar@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent
Date 2016-10-25 12:50 +0200
Message-ID <sw7sR-4re-9@gated-at.bofh.it> (permalink)
References <svQBH-1Ks-3@gated-at.bofh.it> <svQBH-1Ks-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Monday 24 October 2016 10:16 PM, ahaslam@baylibre.com wrote:
> From: Axel Haslam <ahaslam@baylibre.com>
> 
> Currently, the da8xx ohci driver uses a set of gpios and callbacks in
> board files to handle vbus and overcurrent irqs form the power supply.
> However, this does not play nice when moving to a DT based boot were
> we wont have board files.
> 
> Instead of requesting and handling the gpio, use the regulator framework
> to take care of enabling and disabling vbus power. This has the benefit
> that we dont need to pass any more platform data to the driver:
> 
> These will be handled by the regulator framework:
> set_power   ->  regulator_enable/regulator_disable
> get_power   ->  regulator_is_enabled
> get_oci     ->  regulator_get_mode
> ocic_notify ->  regulator notification
> 
> We can keep the default potpgt and use the regulator start delay instead:
> potpgt      -> regulator startup delay time
> 
> The hawk board does not have a GPIO/OVERCURRENT gpio to control vbus,
> (they should not have been decleared/reserved) so, just remove those
> definitions from the hwk board file.
> 
> Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
> ---
>  arch/arm/mach-davinci/board-da830-evm.c     |  97 ++++++++----------------
>  arch/arm/mach-davinci/board-omapl138-hawk.c |  96 +-----------------------
>  arch/arm/mach-davinci/include/mach/da8xx.h  |   2 +-
>  arch/arm/mach-davinci/usb-da8xx.c           |   3 +-
>  drivers/usb/host/ohci-da8xx.c               | 111 ++++++++++++++++++----------
>  include/linux/platform_data/usb-davinci.h   |  19 -----
>  6 files changed, 105 insertions(+), 223 deletions(-)

Can you separate out the driver enhancement from the platform
(mach-davinci) changes? They need to go through different trees.

Thanks,
Sekhar

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent ahaslam@baylibre.com - 2016-10-24 18:50 +0200
  Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for  vbus/overcurrent David Lechner <david@lechnology.com> - 2016-10-25 03:40 +0200
    Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent Axel Haslam <ahaslam@baylibre.com> - 2016-10-25 10:30 +0200
      Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for  vbus/overcurrent David Lechner <david@lechnology.com> - 2016-10-25 19:00 +0200
        Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent Axel Haslam <ahaslam@baylibre.com> - 2016-10-25 19:40 +0200
  Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for  vbus/overcurrent Sekhar Nori <nsekhar@ti.com> - 2016-10-25 12:50 +0200
    Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent Axel Haslam <ahaslam@baylibre.com> - 2016-10-25 13:00 +0200

csiph-web