1. 29 7月, 2015 4 次提交
  2. 07 7月, 2015 1 次提交
  3. 13 6月, 2015 1 次提交
  4. 26 5月, 2015 3 次提交
  5. 22 5月, 2015 1 次提交
    • C
      extcon: Use the unique id for external connector instead of string · 2a9de9c0
      Chanwoo Choi 提交于
      This patch uses the unique id to identify the type of external connector instead
      of string name. The string name have the many potential issues. So, this patch
      defines the 'extcon' enumeration which includes all supported external connector
      on EXTCON subsystem. If new external connector is necessary, the unique id of
      new connector have to be added in 'extcon' enumeration. There are current
      supported external connector in 'enum extcon' as following:
      
      enum extcon {
      	EXTCON_NONE		= 0x0,
      
      	/* USB external connector */
      	EXTCON_USB		= 0x1,
      	EXTCON_USB_HOST		= 0x2,
      
      	/* Charger external connector */
      	EXTCON_TA		= 0x10,
      	EXTCON_FAST_CHARGER	= 0x11,
      	EXTCON_SLOW_CHARGER	= 0x12,
      	EXTCON_CHARGE_DOWNSTREAM = 0x13,
      
      	/* Audio and video external connector */
      	EXTCON_LINE_IN		= 0x20,
      	EXTCON_LINE_OUT		= 0x21,
      	EXTCON_MICROPHONE	= 0x22,
      	EXTCON_HEADPHONE	= 0x23,
      
      	EXTCON_HDMI		= 0x30,
      	EXTCON_MHL		= 0x31,
      	EXTCON_DVI		= 0x32,
      	EXTCON_VGA		= 0x33,
      	EXTCON_SPDIF_IN		= 0x34,
      	EXTCON_SPDIF_OUT	= 0x35,
      	EXTCON_VIDEO_IN		= 0x36,
      	EXTCON_VIDEO_OUT	= 0x37,
      
      	/* Miscellaneous external connector */
      	EXTCON_DOCK		= 0x50,
      	EXTCON_JIG		= 0x51,
      	EXTCON_MECHANICAL	= 0x52,
      
      	EXTCON_END,
      };
      
      For example in extcon-arizona.c:
      To use unique id removes the potential issue about handling
      the inconsistent name of external connector with string.
      - Previously, use the string to register the type of arizona jack connector
      static const char *arizona_cable[] = {
      	"Mechanical",
      	"Microphone",
      	"Headphone",
      	"Line-out",
      };
      - Newly, use the unique id to register the type of arizona jack connector
      static const enum extcon arizona_cable[] = {
      	EXTCON_MECHANICAL,
      	EXTCON_MICROPHONE,
      	EXTCON_HEADPHONE,
      	EXTCON_LINE_OUT,
      
      	EXTCON_NONE,
      };
      
      And this patch modify the prototype of extcon_{get|set}_cable_state_() which
      uses the 'enum extcon id' instead of 'cable_index'. Because although one more
      extcon drivers support USB cable, each extcon driver might has the differnt
      'cable_index' for USB cable. All extcon drivers can use the unique id number
      for same external connector with modified extcon_{get|set}_cable_state_().
      
      - Previously, use 'cable_index' on these functions:
      extcon_get_cable_state_(struct extcon_dev*, int cable_index)
      extcon_set_cable_state_(struct extcon_dev*, int cable_index, bool state)
      
      -Newly, use 'enum extcon id' on these functions:
      extcon_get_cable_state_(struct extcon_dev*, enum extcon id)
      extcon_set_cable_state_(struct extcon_dev*, enum extcon id, bool state)
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Acked-by: NRoger Quadros <rogerq@ti.com>
      Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Acked-by: NRamakrishna Pallala <ramakrishna.pallala@intel.com>
      Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      [arnd: Report the build break about drivers/usb/phy/phy-tahvo.c after using the
      unique id for external connector insteadf of string]
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      [dan.carpenter: Report the build warning of extcon_{set|get}_cable_state_()]
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      2a9de9c0
  6. 10 5月, 2015 2 次提交
  7. 08 5月, 2015 2 次提交
  8. 29 4月, 2015 3 次提交
  9. 28 4月, 2015 1 次提交
    • A
      usb: phy: isp1301: work around tps65010 dependency · 197d0bdf
      Arnd Bergmann 提交于
      The isp1301-omap driver contains special hooks for the TPS65010
      power management controller. It provides its own 'tps65010_set_vbus_draw'
      wrapper in case that driver is not enabled through Kconfig, but
      fails to handle the case where isp1301-omap is built-in but TPS65010
      is a loadable module, which currently results in a link error:
      
      drivers/built-in.o: In function `isp1301_set_power':
      :(.text+0x14e188): undefined reference to `tps65010_set_vbus_draw'
      
      This is a workaround to use the same trick as before also when
      tps65010 is a module. Doing a proper fix would require much larger
      changes to the driver that is not really worth it when the usb-phy
      drivers are going to eventually get replaced with generic-phy
      drivers.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      197d0bdf
  10. 04 4月, 2015 1 次提交
  11. 25 3月, 2015 1 次提交
  12. 20 3月, 2015 1 次提交
  13. 19 3月, 2015 1 次提交
  14. 14 3月, 2015 1 次提交
  15. 11 3月, 2015 4 次提交
  16. 10 3月, 2015 2 次提交
  17. 31 1月, 2015 3 次提交
    • F
      usb: phy: phy-generic: Fix USB PHY gpio reset · 74379991
      Fabio Estevam 提交于
      Since commit e9f2cefb ("usb: phy: generic: migrate to gpio_desc") a
      kernel hang is observed on imx51-babbage board:
      
      [    1.392824] ci_hdrc ci_hdrc.1: doesn't support gadget
      [    1.397975] ci_hdrc ci_hdrc.1: EHCI Host Controller
      [    1.403205] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
      [    1.422335] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
      [    1.432962] hub 1-0:1.0: USB hub found
      [    1.437119] hub 1-0:1.0: 1 port detected
      
      This hang happens because the reset GPIO stays at logic level 0.
      
      The USB PHY reset gpio is defined in the dts file as:
      
      reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
      
      , which means it is active low, so what the gpio reset pin needs to do in this
      case is the following:
      
      - Go to logic level 0 to reset the USB PHY
      - Stay at 0 for a bit
      - Go back to logic level 1
      
      When switching to gpiod API we need to following according to
      Documentation/gpio/consumer.txt:
      
      "The first thing a driver must do with a GPIO is setting its direction. If no
      direction-setting flags have been given to gpiod_get*(), this is done by
      invoking one of the gpiod_direction_*() functions:
      
      	int gpiod_direction_input(struct gpio_desc *desc)
      	int gpiod_direction_output(struct gpio_desc *desc, int value)"
      
      Since no direction-setting flags have been given to devm_gpiod_get_optional()
      in our case, we need to use gpiod_direction_output to comply with the gpiod API.
      
      With this change the USB PHY reset performs a proper reset, the kernel boots
      fine and USB host is functional.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      74379991
    • R
      usb: phy: generic: fix the vbus interrupt request · 0f4ff5f1
      Robert Jarzmik 提交于
      Declare the interrupt as "one shot" so that it is masked until the end
      of the threaded handler. This prevents the irq core from spitting out an
      error :
        "Threaded irq requested with handler=NULL and !ONESHOT for irq 63"
      
      This was introduced by commit "usb: phy: generic: add vbus support".
      Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0f4ff5f1
    • R
      usb: phy: generic: fix the gpios to be optional · 9eb07977
      Robert Jarzmik 提交于
      All the gpios, ie. reset-gpios and vbus-detect-gpio, should be optional
      and not prevent the driver from working. Fix the regression in the
      behavior introduced by commit "usb: phy: generic: migrate to gpio_desc".
      Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Tested-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9eb07977
  18. 27 1月, 2015 4 次提交
  19. 20 1月, 2015 2 次提交
  20. 13 1月, 2015 2 次提交
    • A
      usb: phy: mv-usb: fix usb_phy build errors · 90bdf403
      Arnd Bergmann 提交于
      The driver was recently adapted to a core API change, but the
      change was incomplete, missing out the suspend helper and
      leaving an extraneous local variable around:
      
      usb/phy/phy-mv-usb.c: In function 'mv_otg_update_state':
      usb/phy/phy-mv-usb.c:341:18: warning: unused variable 'phy' [-Wunused-variable]
      
      usb/phy/phy-mv-usb.c: In function 'mv_otg_suspend':
      usb/phy/phy-mv-usb.c:861:16: error: 'struct usb_phy' has no member named 'state'
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: e47d9254 ("usb: move the OTG state from the USB PHY to the OTG structure")
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      90bdf403
    • R
      usb: phy: generic: add vbus support · 7acc9973
      Robert Jarzmik 提交于
      Add support for vbus detection and power supply. This code is more or
      less stolen from phy-gpio-vbus-usb.c, and aims at providing a detection
      mechanism for VBus (ie. usb cable plug) based on a GPIO line, and a
      power supply activation which draws current from the VBus.
      
      [ balbi@ti.com : fix build break ]
      Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      7acc9973