1. 15 Jun, 2016 1 commit
  2. 03 Apr, 2016 1 commit
    • Nishanth Menon's avatar
      extcon: palmas: Drop stray IRQF_EARLY_RESUME flag · f75587b8
      Nishanth Menon authored
      Palmas extcon IRQs are nested threaded and wired to the Palmas
      interrupt controller. So, this flag is not required for nested
      IRQs anymore, since commit 3c646f2c ("genirq: Don't suspend
      nested_thread irqs over system suspend") was merged. However, the
      fix in commit ae64e42c ("extcon: palmas: Drop IRQF_EARLY_RESUME
      flag") missed a stray flag causing the following crash on resume on
      BeagleBoard-X15 platform:
      
      [   53.670141] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
      [..]
      [   53.670141] [<c04ae734>] (omap_set_gpio_triggering) from [<c04aeb94>] (omap_gpio_unmask_irq+0xc0/0xc4)
      [   53.670141] [<c04aeb94>] (omap_gpio_unmask_irq) from [<c01a0b88>] (irq_enable+0x30/0x44)
      [   53.670141] [<c01a0b88>] (irq_enable) from [<c019ebd8>] (__enable_irq+0x54/0x78)
      [   53.670141] [<c019ebd8>] (__enable_irq) from [<c01a4e60>] (resume_irqs+0xe8/0x100)
      [   53.670141] [<c01a4e60>] (resume_irqs) from [<c0514840>] (syscore_resume+0x94/0x298)
      [   53.670141] [<c0514840>] (syscore_resume) from [<c01981cc>] (suspend_devices_and_enter+0x790/0x9e4)
      [   53.670141] [<c01981cc>] (suspend_devices_and_enter) from [<c0198a60>] (pm_suspend+0x640/0x75c)
      [   53.670141] [<c0198a60>] (pm_suspend) from [<c0196bec>] (state_store+0x64/0xb8)
      [   53.670141] [<c0196bec>] (state_store) from [<c0307944>] (kernfs_fop_write+0xc0/0x1bc)
      [   53.670141] [<c0307944>] (kernfs_fop_write) from [<c028acb0>] (__vfs_write+0x1c/0xd8)
      [   53.670141] [<c028acb0>] (__vfs_write) from [<c028bba0>] (vfs_write+0x90/0x16c)
      [   53.670141] [<c028bba0>] (vfs_write) from [<c028c8c0>] (SyS_write+0x44/0x9c)
      [   53.670141] [<c028c8c0>] (SyS_write) from [<c0107840>] (ret_fast_syscall+0x0/0x1c)
      [..]
      
      Fixes: ae64e42c ("extcon: palmas: Drop IRQF_EARLY_RESUME flag")
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
      Cc: Chanwoo Choi <cw00.choi@samsung.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Roger Quadros <rogerq@ti.com>
      Reviewed-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Acked-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      f75587b8
  3. 28 Feb, 2016 1 commit
  4. 04 Feb, 2016 1 commit
  5. 13 Aug, 2015 1 commit
  6. 10 Aug, 2015 1 commit
  7. 09 Aug, 2015 1 commit
  8. 29 Jul, 2015 1 commit
  9. 12 Jun, 2015 1 commit
  10. 22 May, 2015 1 commit
    • Chanwoo Choi's avatar
      extcon: Use the unique id for external connector instead of string · 2a9de9c0
      Chanwoo Choi authored
      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: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Acked-by: default avatarRoger Quadros <rogerq@ti.com>
      Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Acked-by: default avatarRamakrishna Pallala <ramakrishna.pallala@intel.com>
      Reviewed-by: default avatarKrzysztof 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: default avatarArnd Bergmann <arnd@arndb.de>
      [dan.carpenter: Report the build warning of extcon_{set|get}_cable_state_()]
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      2a9de9c0
  11. 19 May, 2015 1 commit
    • Chanwoo Choi's avatar
      extcon: Remove the optional name of extcon device · d71aadda
      Chanwoo Choi authored
      This patch removes the optional name of extcon device. Instead,
      extcon_dev_register() set the device name as 'extcon[number]' naming pattern.
      - /sys/class/extcon/[hardcoded device name] -> /sys/class/extcon/extcon[number]
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Acked-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
      Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Cc: Graeme Gregory <gg@slimlogic.co.uk>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Jaewon Kim <jaewon02.kim@samsung.com>
      d71aadda
  12. 20 Oct, 2014 1 commit
  13. 15 Jun, 2014 2 commits
  14. 28 Apr, 2014 1 commit
  15. 24 Apr, 2014 1 commit
  16. 22 Apr, 2014 1 commit
  17. 18 Mar, 2014 1 commit
  18. 06 Jan, 2014 2 commits
  19. 26 Sep, 2013 2 commits
  20. 04 Aug, 2013 4 commits
  21. 17 Jun, 2013 1 commit