Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1168761
| From | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 2/8] extcon: arizona: Factor out initial GPIO state |
| Date | 2015-06-19 15:00 +0200 |
| Message-ID | <pD43N-7Q7-43@gated-at.bofh.it> (permalink) |
| References | <pD43L-7Q7-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
drivers/extcon/extcon-arizona.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 1fbe3b4..c4d179b 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -1135,6 +1135,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
struct arizona *arizona = dev_get_drvdata(pdev->dev.parent);
struct arizona_pdata *pdata = &arizona->pdata;
struct arizona_extcon_info *info;
+ int gpio_initial_level;
unsigned int val;
unsigned int clamp_mode;
int jack_irq_fall, jack_irq_rise;
@@ -1226,8 +1227,9 @@ static int arizona_extcon_probe(struct platform_device *pdev)
info->micd_num_modes = ARRAY_SIZE(micd_default_modes);
}
+ gpio_initial_level = info->micd_modes[0].gpio;
if (arizona->pdata.micd_pol_gpio > 0) {
- if (info->micd_modes[0].gpio)
+ if (gpio_initial_level)
mode = GPIOF_OUT_INIT_HIGH;
else
mode = GPIOF_OUT_INIT_LOW;
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/8] Add basic microphone detection bindings Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200 [PATCH v4 7/8] mfd: arizona: Update DT doc for new mic detection bindings Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200 [PATCH v4 2/8] extcon: arizona: Factor out initial GPIO state Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200 [PATCH v4 4/8] extcon: arizona: Add basic microphone detection DT/ACPI bindings Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200
csiph-web