]> Git Repo - linux.git/commitdiff
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <[email protected]>
Sun, 20 Mar 2016 22:40:32 +0000 (15:40 -0700)
committerLinus Torvalds <[email protected]>
Sun, 20 Mar 2016 22:40:32 +0000 (15:40 -0700)
Pull ARM SoC driver updates from Arnd Bergmann:
 "Driver updates for ARM SoCs, these contain various things that touch
  the drivers/ directory but got merged through arm-soc for practical
  reasons:

   - Rockchip rk3368 gains power domain support
   - Small updates for the ARM spmi driver
   - The Atmel PMC driver saw a larger rework, touching both
     arch/arm/mach-at91 and drivers/clk/at91
   - All reset controller driver changes alway get merged through
     arm-soc, though this time the largest change is the addition of a
     MIPS pistachio reset driver
   - One bugfix for the NXP (formerly Freescale) i.MX weim bus driver"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
  bus: imx-weim: Take the 'status' property value into account
  clk: at91: remove useless includes
  clk: at91: pmc: remove useless capacities handling
  clk: at91: pmc: drop at91_pmc_base
  usb: gadget: atmel: access the PMC using regmap
  ARM: at91: remove useless includes and function prototypes
  ARM: at91: pm: move idle functions to pm.c
  ARM: at91: pm: find and remap the pmc
  ARM: at91: pm: simply call at91_pm_init
  clk: at91: pmc: move pmc structures to C file
  clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe
  clk: at91: remove IRQ handling and use polling
  clk: at91: make use of syscon/regmap internally
  clk: at91: make use of syscon to share PMC registers in several drivers
  hwmon: (scpi) add energy meter support
  firmware: arm_scpi: add support for 64-bit sensor values
  firmware: arm_scpi: decrease Tx timeout to 20ms
  firmware: arm_scpi: fix send_message and sensor_get_value for big-endian
  reset: sti: Make reset_control_ops const
  reset: zynq: Make reset_control_ops const
  ...

1  2 
drivers/usb/gadget/udc/atmel_usba_udc.c

index dbde1149c218656b8d70b42861ec384748af1296,04265de885a91a36ac9cff53e96ee7495f8e6468..81d42cce885a4ae3a080c20f08ca20f4db241d16
@@@ -17,7 -17,9 +17,9 @@@
  #include <linux/device.h>
  #include <linux/dma-mapping.h>
  #include <linux/list.h>
+ #include <linux/mfd/syscon.h>
  #include <linux/platform_device.h>
+ #include <linux/regmap.h>
  #include <linux/usb/ch9.h>
  #include <linux/usb/gadget.h>
  #include <linux/usb/atmel_usba_udc.h>
@@@ -25,6 -27,8 +27,6 @@@
  #include <linux/of.h>
  #include <linux/of_gpio.h>
  
 -#include <asm/gpio.h>
 -
  #include "atmel_usba_udc.h"
  
  #ifdef CONFIG_USB_GADGET_DEBUG_FS
@@@ -1886,20 -1890,15 +1888,15 @@@ static int atmel_usba_stop(struct usb_g
  #ifdef CONFIG_OF
  static void at91sam9rl_toggle_bias(struct usba_udc *udc, int is_on)
  {
-       unsigned int uckr = at91_pmc_read(AT91_CKGR_UCKR);
-       if (is_on)
-               at91_pmc_write(AT91_CKGR_UCKR, uckr | AT91_PMC_BIASEN);
-       else
-               at91_pmc_write(AT91_CKGR_UCKR, uckr & ~(AT91_PMC_BIASEN));
+       regmap_update_bits(udc->pmc, AT91_CKGR_UCKR, AT91_PMC_BIASEN,
+                          is_on ? AT91_PMC_BIASEN : 0);
  }
  
  static void at91sam9g45_pulse_bias(struct usba_udc *udc)
  {
-       unsigned int uckr = at91_pmc_read(AT91_CKGR_UCKR);
-       at91_pmc_write(AT91_CKGR_UCKR, uckr & ~(AT91_PMC_BIASEN));
-       at91_pmc_write(AT91_CKGR_UCKR, uckr | AT91_PMC_BIASEN);
+       regmap_update_bits(udc->pmc, AT91_CKGR_UCKR, AT91_PMC_BIASEN, 0);
+       regmap_update_bits(udc->pmc, AT91_CKGR_UCKR, AT91_PMC_BIASEN,
+                          AT91_PMC_BIASEN);
  }
  
  static const struct usba_udc_errata at91sam9rl_errata = {
@@@ -1936,6 -1935,9 +1933,9 @@@ static struct usba_ep * atmel_udc_of_in
                return ERR_PTR(-EINVAL);
  
        udc->errata = match->data;
+       udc->pmc = syscon_regmap_lookup_by_compatible("atmel,at91sam9g45-pmc");
+       if (udc->errata && IS_ERR(udc->pmc))
+               return ERR_CAST(udc->pmc);
  
        udc->num_ep = 0;
  
This page took 0.087821 seconds and 4 git commands to generate.