mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-16 20:36:22 +07:00
Update extcon for 5.5
Detailed description for this pull request: 1. Clean up the and fix the minor issue of extcon provider driver - extcon-intel-cht-wc don't reset the USB data connection at probe time in order to prevent the removing all devices from bus. - extcon-sm5502 reset the registers at proble time in order to prevent the some stuck state. And remove the redundant variable initializaiton. -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAl3A/t4WHGN3MDAuY2hv aUBzYW1zdW5nLmNvbQAKCRCczd8s3uvPU/VVEADPAh1VwP8Afj6NLLITYh+TS20x zvpioac/E16hFKfwNma+z8NlKa40OIuyX+nk5k1qes1BeCy0jnvMU4BqMLERI9sk 0H61AFW0DclKmbp0C2CyJnvP9xKMxfLaWXETrZAcQwINjhyeJIO5lNhpNuaJuADP +WlGLtnROF+zsIWxnVp5tUg/hx0nSJPhZhuJie0h6VhcEqu8y++lJlhFPr8gMeV7 ps+GaomLKWqmlbIb+tHyF9gJGpZyfraDHJGrDUqmWucwU89Ub++nKstL6K0bAaTJ UbtqPB96A3hXa4iQDylZbPlXcnZfsadVpuZKrxE7MxKlR8KmmfL3Uvo/1sHa+9zO Z7F6AfqL1oj5pLOK33Zoj9gRfBCKqQ1LrxdBipI6AFPlCI/SyMlF+MxglwtCZ70p Y37b8FoFypxI6Rtsb4VKrHruxfmVitK5wU7xQZQRXp1nle/2rkOQi5iBT1r7yKoR p/f9ixLI/GPEZqB4Szi5XRSLCpT6/LHCBU7GI3rH3kgdI0IqK95Zx0SL1cZDZcLG Lx4Gb93ZLe2x9TIvOi75M0WwnaYu/Pxkyi1a8FTH/fhSqYsk5HziNz+pOsqA8DKY 2SWLuUMoRXR0HMVOSuGwoSWekHFKfZUb6z9igEwo4FoJ5dFGQ0VYHUsHIstuc/0z fUugLRD6b81R/aAQlA== =Hs2+ -----END PGP SIGNATURE----- Merge tag 'extcon-next-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 5.5 Detailed description for this pull request: 1. Clean up the and fix the minor issue of extcon provider driver - extcon-intel-cht-wc don't reset the USB data connection at probe time in order to prevent the removing all devices from bus. - extcon-sm5502 reset the registers at proble time in order to prevent the some stuck state. And remove the redundant variable initializaiton. * tag 'extcon-next-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: sm5502: remove redundant assignment to variable cable_type extcon: sm5502: Reset registers during initialization extcon-intel-cht-wc: Don't reset USB data connection at probe
This commit is contained in:
commit
26a4175372
@ -338,6 +338,7 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)
|
||||
struct intel_soc_pmic *pmic = dev_get_drvdata(pdev->dev.parent);
|
||||
struct cht_wc_extcon_data *ext;
|
||||
unsigned long mask = ~(CHT_WC_PWRSRC_VBUS | CHT_WC_PWRSRC_USBID_MASK);
|
||||
int pwrsrc_sts, id;
|
||||
int irq, ret;
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
@ -387,8 +388,19 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)
|
||||
goto disable_sw_control;
|
||||
}
|
||||
|
||||
/* Route D+ and D- to PMIC for initial charger detection */
|
||||
cht_wc_extcon_set_phymux(ext, MUX_SEL_PMIC);
|
||||
ret = regmap_read(ext->regmap, CHT_WC_PWRSRC_STS, &pwrsrc_sts);
|
||||
if (ret) {
|
||||
dev_err(ext->dev, "Error reading pwrsrc status: %d\n", ret);
|
||||
goto disable_sw_control;
|
||||
}
|
||||
|
||||
/*
|
||||
* If no USB host or device connected, route D+ and D- to PMIC for
|
||||
* initial charger detection
|
||||
*/
|
||||
id = cht_wc_extcon_get_id(ext, pwrsrc_sts);
|
||||
if (id != INTEL_USB_ID_GND)
|
||||
cht_wc_extcon_set_phymux(ext, MUX_SEL_PMIC);
|
||||
|
||||
/* Get initial state */
|
||||
cht_wc_extcon_pwrsrc_event(ext);
|
||||
|
@ -65,6 +65,10 @@ struct sm5502_muic_info {
|
||||
/* Default value of SM5502 register to bring up MUIC device. */
|
||||
static struct reg_data sm5502_reg_data[] = {
|
||||
{
|
||||
.reg = SM5502_REG_RESET,
|
||||
.val = SM5502_REG_RESET_MASK,
|
||||
.invert = true,
|
||||
}, {
|
||||
.reg = SM5502_REG_CONTROL,
|
||||
.val = SM5502_REG_CONTROL_MASK_INT_MASK,
|
||||
.invert = false,
|
||||
@ -272,7 +276,7 @@ static int sm5502_muic_set_path(struct sm5502_muic_info *info,
|
||||
/* Return cable type of attached or detached accessories */
|
||||
static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info)
|
||||
{
|
||||
unsigned int cable_type = -1, adc, dev_type1;
|
||||
unsigned int cable_type, adc, dev_type1;
|
||||
int ret;
|
||||
|
||||
/* Read ADC value according to external cable or button */
|
||||
|
@ -237,6 +237,8 @@ enum sm5502_reg {
|
||||
#define DM_DP_SWITCH_UART ((DM_DP_CON_SWITCH_UART <<SM5502_REG_MANUAL_SW1_DP_SHIFT) \
|
||||
| (DM_DP_CON_SWITCH_UART <<SM5502_REG_MANUAL_SW1_DM_SHIFT))
|
||||
|
||||
#define SM5502_REG_RESET_MASK (0x1)
|
||||
|
||||
/* SM5502 Interrupts */
|
||||
enum sm5502_irq {
|
||||
/* INT1 */
|
||||
|
Loading…
Reference in New Issue
Block a user