Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447040 > unrolled thread
| Started by | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| First post | 2016-07-20 09:40 +0200 |
| Last post | 2016-07-20 10:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/4] extcon: arizona: Remove the usage of extcon_update_state() Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-20 09:40 +0200
Re: [PATCH 1/4] extcon: arizona: Remove the usage of extcon_update_state() Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-07-20 10:30 +0200
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2016-07-20 09:40 +0200 |
| Subject | [PATCH 1/4] extcon: arizona: Remove the usage of extcon_update_state() |
| Message-ID | <rWUgN-6SN-1@gated-at.bofh.it> |
This patch remvoes the usage of extcon_update_state() because
the extcon_update_state() use directly the bit masking calculation
to change the state of external connector without the unique id of
external connector. It makes the code diffcult to read it.
So, this patch uses the extcon_set_cable_state_() instead.
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/extcon/extcon-arizona.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 1d8e0a57bd51..a7161ecd0a1a 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -1149,10 +1149,13 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
info->micd_ranges[i].key, 0);
input_sync(info->input);
- ret = extcon_update_state(info->edev, 0xffffffff, 0);
- if (ret != 0)
- dev_err(arizona->dev, "Removal report failed: %d\n",
- ret);
+ for (i = 0; i < ARRAY_SIZE(arizona_cable) - 1; i++) {
+ ret = extcon_set_cable_state_(info->edev,
+ arizona_cable[i], false);
+ if (ret != 0)
+ dev_err(arizona->dev,
+ "Removal report failed: %d\n", ret);
+ }
regmap_update_bits(arizona->regmap,
ARIZONA_JACK_DETECT_DEBOUNCE,
--
1.9.1
[toc] | [next] | [standalone]
| From | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| Date | 2016-07-20 10:30 +0200 |
| Subject | Re: [PATCH 1/4] extcon: arizona: Remove the usage of extcon_update_state() |
| Message-ID | <rWV3b-7pU-1@gated-at.bofh.it> |
| In reply to | #1447040 |
On Wed, Jul 20, 2016 at 04:38:44PM +0900, Chanwoo Choi wrote: > This patch remvoes the usage of extcon_update_state() because > the extcon_update_state() use directly the bit masking calculation > to change the state of external connector without the unique id of > external connector. It makes the code diffcult to read it. > So, this patch uses the extcon_set_cable_state_() instead. > > Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> > Cc: patches@opensource.wolfsonmicro.com > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> > --- Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Thanks, Charles
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web