diff options
author | Mark Brown | 2013-04-01 22:03:06 +0100 |
---|---|---|
committer | Mark Brown | 2013-04-02 11:53:51 +0100 |
commit | 6fed4d869a11fdbb4c6a5e444dfb2c22f92c3e46 (patch) | |
tree | 53c3e4ec22ae7a35c0a209ba4c2300b8743a07cd /include/linux/mfd/arizona | |
parent | 84eaa13616b6e7d001b7f7b909228087779b677b (diff) |
extcon: arizona: Allow configuration of button detection
The Arizona button detection circuit is configurable, allowing the system
integrator to program a range of thresholds for the buttons supported on
the accessory but currently the driver uses the default button ranges and
does not provide any flexibility in how this is exposed to the application
layer.
Provide platform data allowing the user to control this and to map
the buttons to keys in the input subsystem.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/mfd/arizona')
-rw-r--r-- | include/linux/mfd/arizona/pdata.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 455c51d22d6b..eb11a8ac6db2 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h @@ -86,6 +86,11 @@ struct arizona_micd_config { bool gpio; }; +struct arizona_micd_range { + int max; /** Ohms */ + int key; /** Key to report to input layer */ +}; + struct arizona_pdata { int reset; /** GPIO controlling /RESET, if any */ int ldoena; /** GPIO controlling LODENA, if any */ @@ -138,6 +143,10 @@ struct arizona_pdata { /** Force MICBIAS on for mic detect */ bool micd_force_micbias; + /** Mic detect level parameters */ + const struct arizona_micd_range *micd_ranges; + int num_micd_ranges; + /** Headset polarity configurations */ struct arizona_micd_config *micd_configs; int num_micd_configs; |