* [PATCH RESEND 1/3] extcon: max77693: Remove left-over code after switching to regmap irq chip
@ 2014-10-22 8:45 Krzysztof Kozlowski
2014-10-22 8:45 ` [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts Krzysztof Kozlowski
2014-10-22 8:45 ` [PATCH RESEND 3/3] extcon: max77693: Fix extcon UART on Trats2 board Krzysztof Kozlowski
0 siblings, 2 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2014-10-22 8:45 UTC (permalink / raw)
To: MyungJoo Ham, Chanwoo Choi, Samuel Ortiz, Lee Jones, linux-kernel
Cc: Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz,
Krzysztof Kozlowski
Before switching to regmap irq chip the extcon driver parsed some
initialization data (from platform data or defaults hard coded in the
driver) and adjusted interrupt masks to the init data (code was located
in max77693-irq.c).
However commit 342d669c1ee4 ("mfd: max77693: Handle IRQs using regmap")
removed the max77693-irq.c and replaced whole interrupt handling with
regmap irq chip. Thus the part responsible for using adjusted interrupt
masks disappeared.
Remove left-over code as this is now useless and it is doing nothing.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/extcon/extcon-max77693.c | 21 +--------------------
include/linux/mfd/max77693-private.h | 3 ---
2 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 490e27475bac..863d088c9bdd 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -1201,28 +1201,9 @@ static int max77693_muic_probe(struct platform_device *pdev)
}
for (i = 0; i < num_init_data; i++) {
- enum max77693_irq_source irq_src
- = MAX77693_IRQ_GROUP_NR;
-
regmap_write(info->max77693->regmap_muic,
init_data[i].addr,
init_data[i].data);
-
- switch (init_data[i].addr) {
- case MAX77693_MUIC_REG_INTMASK1:
- irq_src = MUIC_INT1;
- break;
- case MAX77693_MUIC_REG_INTMASK2:
- irq_src = MUIC_INT2;
- break;
- case MAX77693_MUIC_REG_INTMASK3:
- irq_src = MUIC_INT3;
- break;
- }
-
- if (irq_src < MAX77693_IRQ_GROUP_NR)
- info->max77693->irq_masks_cur[irq_src]
- = init_data[i].data;
}
if (pdata && pdata->muic_data) {
@@ -1259,7 +1240,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
}
/* Set initial path for UART */
- max77693_muic_set_path(info, info->path_uart, true);
+ max77693_muic_set_path(info, info->path_uart, true);
/* Check revision number of MUIC device*/
ret = regmap_read(info->max77693->regmap_muic,
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
index 08dae01258b9..bad716a659d3 100644
--- a/include/linux/mfd/max77693-private.h
+++ b/include/linux/mfd/max77693-private.h
@@ -439,9 +439,6 @@ struct max77693_dev {
int irq;
int irq_gpio;
- struct mutex irqlock;
- int irq_masks_cur[MAX77693_IRQ_GROUP_NR];
- int irq_masks_cache[MAX77693_IRQ_GROUP_NR];
};
enum max77693_types {
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts 2014-10-22 8:45 [PATCH RESEND 1/3] extcon: max77693: Remove left-over code after switching to regmap irq chip Krzysztof Kozlowski @ 2014-10-22 8:45 ` Krzysztof Kozlowski 2014-10-22 9:04 ` Chanwoo Choi 2014-10-22 8:45 ` [PATCH RESEND 3/3] extcon: max77693: Fix extcon UART on Trats2 board Krzysztof Kozlowski 1 sibling, 1 reply; 7+ messages in thread From: Krzysztof Kozlowski @ 2014-10-22 8:45 UTC (permalink / raw) To: MyungJoo Ham, Chanwoo Choi, Samuel Ortiz, Lee Jones, linux-kernel Cc: Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski The driver was requesting all MUIC interrupts but then was masking most of them manually at end of probe (with default_init_data). Since default_init_data cannot be passed through DTS (no bindings for driver), this was a conflicting behavior. First get everything, then mask what we don't want. This could change after adding DTS bindings for requesting specific MUIC interrupts. Until then driver should request only these MUIC interrupts which he is really interested in. The commit does not introduce any functional change when the driver is used with DTS (no platform data). However this changes the behavior with platform data supplied. In such case the driver will request only 3 interrupts (ADC, ADC1K, ChgTyp). Platform data could still unmask other interrupts but they won't be handled by the driver. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> --- drivers/extcon/extcon-max77693.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 863d088c9bdd..9d21e75a7032 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -44,19 +44,6 @@ static struct max77693_reg_data default_init_data[] = { .addr = MAX77693_MUIC_REG_STATUS2, .data = STATUS2_CHGDETRUN_MASK, }, { - /* INTMASK1 - Unmask [3]ADC1KM,[0]ADCM */ - .addr = MAX77693_MUIC_REG_INTMASK1, - .data = INTMASK1_ADC1K_MASK - | INTMASK1_ADC_MASK, - }, { - /* INTMASK2 - Unmask [0]ChgTypM */ - .addr = MAX77693_MUIC_REG_INTMASK2, - .data = INTMASK2_CHGTYP_MASK, - }, { - /* INTMASK3 - Mask all of interrupts */ - .addr = MAX77693_MUIC_REG_INTMASK3, - .data = 0x0, - }, { /* CDETCTRL2 */ .addr = MAX77693_MUIC_REG_CDETCTRL2, .data = CDETCTRL2_VIDRMEN_MASK @@ -135,21 +122,8 @@ struct max77693_muic_irq { static struct max77693_muic_irq muic_irqs[] = { { MAX77693_MUIC_IRQ_INT1_ADC, "muic-ADC" }, - { MAX77693_MUIC_IRQ_INT1_ADC_LOW, "muic-ADCLOW" }, - { MAX77693_MUIC_IRQ_INT1_ADC_ERR, "muic-ADCError" }, { MAX77693_MUIC_IRQ_INT1_ADC1K, "muic-ADC1K" }, { MAX77693_MUIC_IRQ_INT2_CHGTYP, "muic-CHGTYP" }, - { MAX77693_MUIC_IRQ_INT2_CHGDETREUN, "muic-CHGDETREUN" }, - { MAX77693_MUIC_IRQ_INT2_DCDTMR, "muic-DCDTMR" }, - { MAX77693_MUIC_IRQ_INT2_DXOVP, "muic-DXOVP" }, - { MAX77693_MUIC_IRQ_INT2_VBVOLT, "muic-VBVOLT" }, - { MAX77693_MUIC_IRQ_INT2_VIDRM, "muic-VIDRM" }, - { MAX77693_MUIC_IRQ_INT3_EOC, "muic-EOC" }, - { MAX77693_MUIC_IRQ_INT3_CGMBC, "muic-CGMBC" }, - { MAX77693_MUIC_IRQ_INT3_OVP, "muic-OVP" }, - { MAX77693_MUIC_IRQ_INT3_MBCCHG_ERR, "muic-MBCCHG_ERR" }, - { MAX77693_MUIC_IRQ_INT3_CHG_ENABLED, "muic-CHG_ENABLED" }, - { MAX77693_MUIC_IRQ_INT3_BAT_DET, "muic-BAT_DET" }, }; /* Define supported accessory type */ -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts 2014-10-22 8:45 ` [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts Krzysztof Kozlowski @ 2014-10-22 9:04 ` Chanwoo Choi 2014-10-22 9:16 ` Krzysztof Kozlowski 0 siblings, 1 reply; 7+ messages in thread From: Chanwoo Choi @ 2014-10-22 9:04 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: MyungJoo Ham, Samuel Ortiz, Lee Jones, linux-kernel, Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz Hi Krzysztof, The extcon-max77693.c was tested by all cables (mhl, hdmi, usb, usb-host, dock for audio play, dock for mhl). with default_init_data register setting. If you deletes legacy default_init_data[] register setting, extcon-max77693.c can not guarantee the operation of upper cables. So, I want to maintain 'default_init_data' register setting value. Thanks, Chanwoo Choi On 10/22/2014 05:45 PM, Krzysztof Kozlowski wrote: > The driver was requesting all MUIC interrupts but then was masking most > of them manually at end of probe (with default_init_data). Since > default_init_data cannot be passed through DTS (no bindings for driver), > this was a conflicting behavior. First get everything, then mask what we > don't want. > > This could change after adding DTS bindings for requesting specific > MUIC interrupts. Until then driver should request only these MUIC > interrupts which he is really interested in. > > The commit does not introduce any functional change when the driver is > used with DTS (no platform data). However this changes the behavior with > platform data supplied. In such case the driver will request only 3 > interrupts (ADC, ADC1K, ChgTyp). Platform data could still unmask other > interrupts but they won't be handled by the driver. > > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> > --- > drivers/extcon/extcon-max77693.c | 26 -------------------------- > 1 file changed, 26 deletions(-) > > diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c > index 863d088c9bdd..9d21e75a7032 100644 > --- a/drivers/extcon/extcon-max77693.c > +++ b/drivers/extcon/extcon-max77693.c > @@ -44,19 +44,6 @@ static struct max77693_reg_data default_init_data[] = { > .addr = MAX77693_MUIC_REG_STATUS2, > .data = STATUS2_CHGDETRUN_MASK, > }, { > - /* INTMASK1 - Unmask [3]ADC1KM,[0]ADCM */ > - .addr = MAX77693_MUIC_REG_INTMASK1, > - .data = INTMASK1_ADC1K_MASK > - | INTMASK1_ADC_MASK, > - }, { > - /* INTMASK2 - Unmask [0]ChgTypM */ > - .addr = MAX77693_MUIC_REG_INTMASK2, > - .data = INTMASK2_CHGTYP_MASK, > - }, { > - /* INTMASK3 - Mask all of interrupts */ > - .addr = MAX77693_MUIC_REG_INTMASK3, > - .data = 0x0, > - }, { > /* CDETCTRL2 */ > .addr = MAX77693_MUIC_REG_CDETCTRL2, > .data = CDETCTRL2_VIDRMEN_MASK > @@ -135,21 +122,8 @@ struct max77693_muic_irq { > > static struct max77693_muic_irq muic_irqs[] = { > { MAX77693_MUIC_IRQ_INT1_ADC, "muic-ADC" }, > - { MAX77693_MUIC_IRQ_INT1_ADC_LOW, "muic-ADCLOW" }, > - { MAX77693_MUIC_IRQ_INT1_ADC_ERR, "muic-ADCError" }, > { MAX77693_MUIC_IRQ_INT1_ADC1K, "muic-ADC1K" }, > { MAX77693_MUIC_IRQ_INT2_CHGTYP, "muic-CHGTYP" }, > - { MAX77693_MUIC_IRQ_INT2_CHGDETREUN, "muic-CHGDETREUN" }, > - { MAX77693_MUIC_IRQ_INT2_DCDTMR, "muic-DCDTMR" }, > - { MAX77693_MUIC_IRQ_INT2_DXOVP, "muic-DXOVP" }, > - { MAX77693_MUIC_IRQ_INT2_VBVOLT, "muic-VBVOLT" }, > - { MAX77693_MUIC_IRQ_INT2_VIDRM, "muic-VIDRM" }, > - { MAX77693_MUIC_IRQ_INT3_EOC, "muic-EOC" }, > - { MAX77693_MUIC_IRQ_INT3_CGMBC, "muic-CGMBC" }, > - { MAX77693_MUIC_IRQ_INT3_OVP, "muic-OVP" }, > - { MAX77693_MUIC_IRQ_INT3_MBCCHG_ERR, "muic-MBCCHG_ERR" }, > - { MAX77693_MUIC_IRQ_INT3_CHG_ENABLED, "muic-CHG_ENABLED" }, > - { MAX77693_MUIC_IRQ_INT3_BAT_DET, "muic-BAT_DET" }, > }; > > /* Define supported accessory type */ > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts 2014-10-22 9:04 ` Chanwoo Choi @ 2014-10-22 9:16 ` Krzysztof Kozlowski 0 siblings, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2014-10-22 9:16 UTC (permalink / raw) To: Chanwoo Choi Cc: MyungJoo Ham, Samuel Ortiz, Lee Jones, linux-kernel, Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz On śro, 2014-10-22 at 18:04 +0900, Chanwoo Choi wrote: > Hi Krzysztof, > > The extcon-max77693.c was tested by all cables (mhl, hdmi, usb, usb-host, dock for audio play, dock for mhl). > with default_init_data register setting. If you deletes legacy default_init_data[] register setting, > extcon-max77693.c can not guarantee the operation of upper cables. > > So, I want to maintain 'default_init_data' register setting value. I understand. Is this driver used anywhere without DTS? Because the difference will be only in non-DTS board. With DTS the driver receives the same interrupts (before/after patch). However I do not insist on this patch. It is merely a cleanup. Best regards, Krzysztof > > Thanks, > Chanwoo Choi > > On 10/22/2014 05:45 PM, Krzysztof Kozlowski wrote: > > The driver was requesting all MUIC interrupts but then was masking most > > of them manually at end of probe (with default_init_data). Since > > default_init_data cannot be passed through DTS (no bindings for driver), > > this was a conflicting behavior. First get everything, then mask what we > > don't want. > > > > This could change after adding DTS bindings for requesting specific > > MUIC interrupts. Until then driver should request only these MUIC > > interrupts which he is really interested in. > > > > The commit does not introduce any functional change when the driver is > > used with DTS (no platform data). However this changes the behavior with > > platform data supplied. In such case the driver will request only 3 > > interrupts (ADC, ADC1K, ChgTyp). Platform data could still unmask other > > interrupts but they won't be handled by the driver. > > > > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> > > --- > > drivers/extcon/extcon-max77693.c | 26 -------------------------- > > 1 file changed, 26 deletions(-) > > > > diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c > > index 863d088c9bdd..9d21e75a7032 100644 > > --- a/drivers/extcon/extcon-max77693.c > > +++ b/drivers/extcon/extcon-max77693.c > > @@ -44,19 +44,6 @@ static struct max77693_reg_data default_init_data[] = { > > .addr = MAX77693_MUIC_REG_STATUS2, > > .data = STATUS2_CHGDETRUN_MASK, > > }, { > > - /* INTMASK1 - Unmask [3]ADC1KM,[0]ADCM */ > > - .addr = MAX77693_MUIC_REG_INTMASK1, > > - .data = INTMASK1_ADC1K_MASK > > - | INTMASK1_ADC_MASK, > > - }, { > > - /* INTMASK2 - Unmask [0]ChgTypM */ > > - .addr = MAX77693_MUIC_REG_INTMASK2, > > - .data = INTMASK2_CHGTYP_MASK, > > - }, { > > - /* INTMASK3 - Mask all of interrupts */ > > - .addr = MAX77693_MUIC_REG_INTMASK3, > > - .data = 0x0, > > - }, { > > /* CDETCTRL2 */ > > .addr = MAX77693_MUIC_REG_CDETCTRL2, > > .data = CDETCTRL2_VIDRMEN_MASK > > @@ -135,21 +122,8 @@ struct max77693_muic_irq { > > > > static struct max77693_muic_irq muic_irqs[] = { > > { MAX77693_MUIC_IRQ_INT1_ADC, "muic-ADC" }, > > - { MAX77693_MUIC_IRQ_INT1_ADC_LOW, "muic-ADCLOW" }, > > - { MAX77693_MUIC_IRQ_INT1_ADC_ERR, "muic-ADCError" }, > > { MAX77693_MUIC_IRQ_INT1_ADC1K, "muic-ADC1K" }, > > { MAX77693_MUIC_IRQ_INT2_CHGTYP, "muic-CHGTYP" }, > > - { MAX77693_MUIC_IRQ_INT2_CHGDETREUN, "muic-CHGDETREUN" }, > > - { MAX77693_MUIC_IRQ_INT2_DCDTMR, "muic-DCDTMR" }, > > - { MAX77693_MUIC_IRQ_INT2_DXOVP, "muic-DXOVP" }, > > - { MAX77693_MUIC_IRQ_INT2_VBVOLT, "muic-VBVOLT" }, > > - { MAX77693_MUIC_IRQ_INT2_VIDRM, "muic-VIDRM" }, > > - { MAX77693_MUIC_IRQ_INT3_EOC, "muic-EOC" }, > > - { MAX77693_MUIC_IRQ_INT3_CGMBC, "muic-CGMBC" }, > > - { MAX77693_MUIC_IRQ_INT3_OVP, "muic-OVP" }, > > - { MAX77693_MUIC_IRQ_INT3_MBCCHG_ERR, "muic-MBCCHG_ERR" }, > > - { MAX77693_MUIC_IRQ_INT3_CHG_ENABLED, "muic-CHG_ENABLED" }, > > - { MAX77693_MUIC_IRQ_INT3_BAT_DET, "muic-BAT_DET" }, > > }; > > > > /* Define supported accessory type */ > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH RESEND 3/3] extcon: max77693: Fix extcon UART on Trats2 board 2014-10-22 8:45 [PATCH RESEND 1/3] extcon: max77693: Remove left-over code after switching to regmap irq chip Krzysztof Kozlowski 2014-10-22 8:45 ` [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts Krzysztof Kozlowski @ 2014-10-22 8:45 ` Krzysztof Kozlowski 2014-10-22 9:09 ` Chanwoo Choi 1 sibling, 1 reply; 7+ messages in thread From: Krzysztof Kozlowski @ 2014-10-22 8:45 UTC (permalink / raw) To: MyungJoo Ham, Chanwoo Choi, Samuel Ortiz, Lee Jones, linux-kernel Cc: Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski When JIG was set to "boot on" mode, the UART connection did not work because it was assigned to Dock-Car cable (path: audio), not JIG-UART-ON cable. This was introduced in 39bf369e4ed3 ("extcon: max77693: Add support dock device and buttons") while adding dock features. Assign the JIG-UART-ON back to UART path. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> --- drivers/extcon/extcon-max77693.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 9d21e75a7032..beaa8cd71c3b 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -206,7 +206,7 @@ static const char *max77693_extcon_cable[] = { [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON", [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF", [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF", - [EXTCON_CABLE_JIG_UART_ON] = "Dock-Car", + [EXTCON_CABLE_JIG_UART_ON] = "JIG-UART-ON", [EXTCON_CABLE_DOCK_SMART] = "Dock-Smart", [EXTCON_CABLE_DOCK_DESK] = "Dock-Desk", [EXTCON_CABLE_DOCK_AUDIO] = "Dock-Audio", @@ -506,9 +506,6 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info, extcon_set_cable_state(info->edev, "Dock-Smart", attached); extcon_set_cable_state(info->edev, "MHL", attached); goto out; - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ - strcpy(dock_name, "Dock-Car"); - break; case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ strcpy(dock_name, "Dock-Desk"); break; @@ -643,6 +640,11 @@ static int max77693_muic_jig_handler(struct max77693_muic_info *info, strcpy(cable_name, "JIG-UART-OFF"); path = CONTROL1_SW_UART; break; + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* ADC_JIG_UART_ON */ + /* PATH:AP_UART */ + strcpy(cable_name, "JIG-UART-ON"); + path = CONTROL1_SW_UART; + break; default: dev_err(info->dev, "failed to detect %s jig cable\n", attached ? "attached" : "detached"); @@ -682,13 +684,13 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info) case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF: case MAX77693_MUIC_ADC_FACTORY_MODE_USB_ON: case MAX77693_MUIC_ADC_FACTORY_MODE_UART_OFF: + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* JIG */ ret = max77693_muic_jig_handler(info, cable_type, attached); if (ret < 0) return ret; break; case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ /* -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 3/3] extcon: max77693: Fix extcon UART on Trats2 board 2014-10-22 8:45 ` [PATCH RESEND 3/3] extcon: max77693: Fix extcon UART on Trats2 board Krzysztof Kozlowski @ 2014-10-22 9:09 ` Chanwoo Choi 2014-10-22 9:13 ` Krzysztof Kozlowski 0 siblings, 1 reply; 7+ messages in thread From: Chanwoo Choi @ 2014-10-22 9:09 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: MyungJoo Ham, Samuel Ortiz, Lee Jones, linux-kernel, Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz On 10/22/2014 05:45 PM, Krzysztof Kozlowski wrote: > When JIG was set to "boot on" mode, the UART connection did not work > because it was assigned to Dock-Car cable (path: audio), not JIG-UART-ON > cable. > > This was introduced in 39bf369e4ed3 ("extcon: max77693: Add support dock > device and buttons") while adding dock features. > > Assign the JIG-UART-ON back to UART path. > > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> I want to change the name of this patch because I don't prefer to use board name on extcon driver patch. before - extcon: max77693: Fix extcon UART on Trats2 board after - extcon: max77693: Fix cable name of JIG_UART_ON Applied it. Thanks, Chanwoo Choi > --- > drivers/extcon/extcon-max77693.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c > index 9d21e75a7032..beaa8cd71c3b 100644 > --- a/drivers/extcon/extcon-max77693.c > +++ b/drivers/extcon/extcon-max77693.c > @@ -206,7 +206,7 @@ static const char *max77693_extcon_cable[] = { > [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON", > [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF", > [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF", > - [EXTCON_CABLE_JIG_UART_ON] = "Dock-Car", > + [EXTCON_CABLE_JIG_UART_ON] = "JIG-UART-ON", > [EXTCON_CABLE_DOCK_SMART] = "Dock-Smart", > [EXTCON_CABLE_DOCK_DESK] = "Dock-Desk", > [EXTCON_CABLE_DOCK_AUDIO] = "Dock-Audio", > @@ -506,9 +506,6 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info, > extcon_set_cable_state(info->edev, "Dock-Smart", attached); > extcon_set_cable_state(info->edev, "MHL", attached); > goto out; > - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ > - strcpy(dock_name, "Dock-Car"); > - break; > case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ > strcpy(dock_name, "Dock-Desk"); > break; > @@ -643,6 +640,11 @@ static int max77693_muic_jig_handler(struct max77693_muic_info *info, > strcpy(cable_name, "JIG-UART-OFF"); > path = CONTROL1_SW_UART; > break; > + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* ADC_JIG_UART_ON */ > + /* PATH:AP_UART */ > + strcpy(cable_name, "JIG-UART-ON"); > + path = CONTROL1_SW_UART; > + break; > default: > dev_err(info->dev, "failed to detect %s jig cable\n", > attached ? "attached" : "detached"); > @@ -682,13 +684,13 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info) > case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF: > case MAX77693_MUIC_ADC_FACTORY_MODE_USB_ON: > case MAX77693_MUIC_ADC_FACTORY_MODE_UART_OFF: > + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: > /* JIG */ > ret = max77693_muic_jig_handler(info, cable_type, attached); > if (ret < 0) > return ret; > break; > case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ > - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ > case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ > case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ > /* > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND 3/3] extcon: max77693: Fix extcon UART on Trats2 board 2014-10-22 9:09 ` Chanwoo Choi @ 2014-10-22 9:13 ` Krzysztof Kozlowski 0 siblings, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2014-10-22 9:13 UTC (permalink / raw) To: Chanwoo Choi Cc: MyungJoo Ham, Samuel Ortiz, Lee Jones, linux-kernel, Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz On śro, 2014-10-22 at 18:09 +0900, Chanwoo Choi wrote: > On 10/22/2014 05:45 PM, Krzysztof Kozlowski wrote: > > When JIG was set to "boot on" mode, the UART connection did not work > > because it was assigned to Dock-Car cable (path: audio), not JIG-UART-ON > > cable. > > > > This was introduced in 39bf369e4ed3 ("extcon: max77693: Add support dock > > device and buttons") while adding dock features. > > > > Assign the JIG-UART-ON back to UART path. > > > > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> > > I want to change the name of this patch because I don't prefer to use board name on extcon driver patch. > before - extcon: max77693: Fix extcon UART on Trats2 board > after - extcon: max77693: Fix cable name of JIG_UART_ON No problem, thanks! > > Applied it. > > Thanks, > Chanwoo Choi > > > --- > > drivers/extcon/extcon-max77693.c | 12 +++++++----- > > 1 file changed, 7 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c > > index 9d21e75a7032..beaa8cd71c3b 100644 > > --- a/drivers/extcon/extcon-max77693.c > > +++ b/drivers/extcon/extcon-max77693.c > > @@ -206,7 +206,7 @@ static const char *max77693_extcon_cable[] = { > > [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON", > > [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF", > > [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF", > > - [EXTCON_CABLE_JIG_UART_ON] = "Dock-Car", > > + [EXTCON_CABLE_JIG_UART_ON] = "JIG-UART-ON", > > [EXTCON_CABLE_DOCK_SMART] = "Dock-Smart", > > [EXTCON_CABLE_DOCK_DESK] = "Dock-Desk", > > [EXTCON_CABLE_DOCK_AUDIO] = "Dock-Audio", > > @@ -506,9 +506,6 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info, > > extcon_set_cable_state(info->edev, "Dock-Smart", attached); > > extcon_set_cable_state(info->edev, "MHL", attached); > > goto out; > > - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ > > - strcpy(dock_name, "Dock-Car"); > > - break; > > case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ > > strcpy(dock_name, "Dock-Desk"); > > break; > > @@ -643,6 +640,11 @@ static int max77693_muic_jig_handler(struct max77693_muic_info *info, > > strcpy(cable_name, "JIG-UART-OFF"); > > path = CONTROL1_SW_UART; > > break; > > + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* ADC_JIG_UART_ON */ > > + /* PATH:AP_UART */ > > + strcpy(cable_name, "JIG-UART-ON"); > > + path = CONTROL1_SW_UART; > > + break; > > default: > > dev_err(info->dev, "failed to detect %s jig cable\n", > > attached ? "attached" : "detached"); > > @@ -682,13 +684,13 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info) > > case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF: > > case MAX77693_MUIC_ADC_FACTORY_MODE_USB_ON: > > case MAX77693_MUIC_ADC_FACTORY_MODE_UART_OFF: > > + case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: > > /* JIG */ > > ret = max77693_muic_jig_handler(info, cable_type, attached); > > if (ret < 0) > > return ret; > > break; > > case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ > > - case MAX77693_MUIC_ADC_FACTORY_MODE_UART_ON: /* Dock-Car */ > > case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ > > case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ > > /* > > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-10-22 9:16 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-22 8:45 [PATCH RESEND 1/3] extcon: max77693: Remove left-over code after switching to regmap irq chip Krzysztof Kozlowski 2014-10-22 8:45 ` [PATCH RESEND 2/3] extcon: max77693: Request only specific interrupts Krzysztof Kozlowski 2014-10-22 9:04 ` Chanwoo Choi 2014-10-22 9:16 ` Krzysztof Kozlowski 2014-10-22 8:45 ` [PATCH RESEND 3/3] extcon: max77693: Fix extcon UART on Trats2 board Krzysztof Kozlowski 2014-10-22 9:09 ` Chanwoo Choi 2014-10-22 9:13 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox