ab7826595e
No new drivers this time, but a bunch of fairly big cleanups: - Roger Quadros worked on a OMAP USBHS and TLL platform data consolidation, OMAP5 support and clock management code cleanup. - The first step of a major sync for the ab8500 driver from Lee Jones. In particular, the debugfs and the sysct interfaces got extended and improved. - Peter Ujfalusi sent a nice patchset for cleaning and fixing the twl-core driver, with a much needed module id lookup code improvement. - The regular wm5102 and arizona cleanups and fixes from Mark Brown. - Laxman Dewangan extended the palmas APIs in order to implement the palmas GPIO and rt drivers. - Laxman also added DT support for the tps65090 driver. - The Intel SCH and ICH drivers got a couple fixes from Aaron Sierra and Darren Hart. - Linus Walleij patchset for the ab8500 driver allowed ab8500 and ab9540 based devices to switch to the new abx500 pin-ctrl driver. - The max8925 now has device tree and irqdomain support thanks to Qing Xu. - The recently added rtsx driver got a few cleanups and fixes for a better card detection code path and now also supports the RTS5227 chipset, thanks to Wei Wang and Roger Tseng. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJRJWtoAAoJEIqAPN1PVmxKHvEP/2B0uUJQpRjTjc9lgrzaUdFO QdSyj8Vpz1fZPF3cDuik/Be91U1nICyJWZZ7Yvngih3kbqiGw8nbp9AATwdF4Anl +QEtPS9YIpu1w5NS4r01q+cx3NxFsaR5yfNPKLWWnLtN8zHq4qQS8SF8jjdrsgkz zUJrjn1GfPPeuyR6Fuko9Mxk6oQ6TUazWJwmxzSCcrKKQ7GlAnbRWcwv2Qnv3GTg xi9S85xmLtVhLmMIQ2OR4JP56Vc49OL2/+hv1uShtFVDR4JLeZ5l8j0IPjgXJTrv ZbcrzEfJkV+zkY5RmDQrZzNLIWQmH9lj0bzitrS8Ii622J/mfnvQEgnC5fObphjg sYKJuBtO9o7XtFJxH7/oXdwM2gC5jDy43FmRv9J2mIDVoX8kNZMzY/sqmL8jm7KD MZU0D7liOyF3/1VbZHGSplKp+HKd5XYXCDQEesG/urkDr2edYHdb52iUVYGC32yV MaTqXnRMGURdjhCorAZPV8hoQOSWV8pj6oskk+E3upCmWjQWdhKMw3/HzasDLO9B eoQSgwZXJLTV8hJjAdgPUjZbxyOyW+9jKA12nyqwX3noq0NseSSJaeZUWmLecmbF vXcg4LAwSUycNJ0DxtWC2oEUV9jv4B+dOE7avVT6BDSvth4nzDlO9gOTtxBLcgTz JKrAPxY1nS4AUXJbsYTq =BhC1 -----END PGP SIGNATURE----- Merge tag 'mfd-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFS updates from Samuel Ortiz: "This is the MFD pull request for the 3.9 merge window. No new drivers this time, but a bunch of fairly big cleanups: - Roger Quadros worked on a OMAP USBHS and TLL platform data consolidation, OMAP5 support and clock management code cleanup. - The first step of a major sync for the ab8500 driver from Lee Jones. In particular, the debugfs and the sysct interfaces got extended and improved. - Peter Ujfalusi sent a nice patchset for cleaning and fixing the twl-core driver, with a much needed module id lookup code improvement. - The regular wm5102 and arizona cleanups and fixes from Mark Brown. - Laxman Dewangan extended the palmas APIs in order to implement the palmas GPIO and rt drivers. - Laxman also added DT support for the tps65090 driver. - The Intel SCH and ICH drivers got a couple fixes from Aaron Sierra and Darren Hart. - Linus Walleij patchset for the ab8500 driver allowed ab8500 and ab9540 based devices to switch to the new abx500 pin-ctrl driver. - The max8925 now has device tree and irqdomain support thanks to Qing Xu. - The recently added rtsx driver got a few cleanups and fixes for a better card detection code path and now also supports the RTS5227 chipset, thanks to Wei Wang and Roger Tseng." * tag 'mfd-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (109 commits) mfd: lpc_ich: Use devres API to allocate private data mfd: lpc_ich: Add Device IDs for Intel Wellsburg PCH mfd: lpc_sch: Accomodate partial population of the MFD devices mfd: da9052-i2c: Staticize da9052_i2c_fix() mfd: syscon: Fix sparse warning mfd: twl-core: Fix kernel panic on boot mfd: rtsx: Fix issue that booting OS with SD card inserted mfd: ab8500: Fix compile error mfd: Add missing GENERIC_HARDIRQS dependecies Documentation: Add docs for max8925 dt mfd: max8925: Add dts mfd: max8925: Support dt for backlight mfd: max8925: Fix onkey driver irq base mfd: max8925: Fix mfd device register failure mfd: max8925: Add irqdomain for dt mfd: vexpress: Allow vexpress-sysreg to self-initialise mfd: rtsx: Support RTS5227 mfd: rtsx: Implement driving adjustment to device-dependent callbacks mfd: vexpress: Add pseudo-GPIO based LEDs mfd: ab8500: Rename ab8500 to abx500 for hwmon driver ...
167 lines
5.2 KiB
C
167 lines
5.2 KiB
C
/*
|
|
* Platform data for Arizona devices
|
|
*
|
|
* Copyright 2012 Wolfson Microelectronics. PLC.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _ARIZONA_PDATA_H
|
|
#define _ARIZONA_PDATA_H
|
|
|
|
#define ARIZONA_GPN_DIR 0x8000 /* GPN_DIR */
|
|
#define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */
|
|
#define ARIZONA_GPN_DIR_SHIFT 15 /* GPN_DIR */
|
|
#define ARIZONA_GPN_DIR_WIDTH 1 /* GPN_DIR */
|
|
#define ARIZONA_GPN_PU 0x4000 /* GPN_PU */
|
|
#define ARIZONA_GPN_PU_MASK 0x4000 /* GPN_PU */
|
|
#define ARIZONA_GPN_PU_SHIFT 14 /* GPN_PU */
|
|
#define ARIZONA_GPN_PU_WIDTH 1 /* GPN_PU */
|
|
#define ARIZONA_GPN_PD 0x2000 /* GPN_PD */
|
|
#define ARIZONA_GPN_PD_MASK 0x2000 /* GPN_PD */
|
|
#define ARIZONA_GPN_PD_SHIFT 13 /* GPN_PD */
|
|
#define ARIZONA_GPN_PD_WIDTH 1 /* GPN_PD */
|
|
#define ARIZONA_GPN_LVL 0x0800 /* GPN_LVL */
|
|
#define ARIZONA_GPN_LVL_MASK 0x0800 /* GPN_LVL */
|
|
#define ARIZONA_GPN_LVL_SHIFT 11 /* GPN_LVL */
|
|
#define ARIZONA_GPN_LVL_WIDTH 1 /* GPN_LVL */
|
|
#define ARIZONA_GPN_POL 0x0400 /* GPN_POL */
|
|
#define ARIZONA_GPN_POL_MASK 0x0400 /* GPN_POL */
|
|
#define ARIZONA_GPN_POL_SHIFT 10 /* GPN_POL */
|
|
#define ARIZONA_GPN_POL_WIDTH 1 /* GPN_POL */
|
|
#define ARIZONA_GPN_OP_CFG 0x0200 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_OP_CFG_MASK 0x0200 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_OP_CFG_SHIFT 9 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_OP_CFG_WIDTH 1 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_DB 0x0100 /* GPN_DB */
|
|
#define ARIZONA_GPN_DB_MASK 0x0100 /* GPN_DB */
|
|
#define ARIZONA_GPN_DB_SHIFT 8 /* GPN_DB */
|
|
#define ARIZONA_GPN_DB_WIDTH 1 /* GPN_DB */
|
|
#define ARIZONA_GPN_FN_MASK 0x007F /* GPN_FN - [6:0] */
|
|
#define ARIZONA_GPN_FN_SHIFT 0 /* GPN_FN - [6:0] */
|
|
#define ARIZONA_GPN_FN_WIDTH 7 /* GPN_FN - [6:0] */
|
|
|
|
#define ARIZONA_MAX_GPIO 5
|
|
|
|
#define ARIZONA_32KZ_MCLK1 1
|
|
#define ARIZONA_32KZ_MCLK2 2
|
|
#define ARIZONA_32KZ_NONE 3
|
|
|
|
#define ARIZONA_MAX_INPUT 4
|
|
|
|
#define ARIZONA_DMIC_MICVDD 0
|
|
#define ARIZONA_DMIC_MICBIAS1 1
|
|
#define ARIZONA_DMIC_MICBIAS2 2
|
|
#define ARIZONA_DMIC_MICBIAS3 3
|
|
|
|
#define ARIZONA_MAX_MICBIAS 3
|
|
|
|
#define ARIZONA_INMODE_DIFF 0
|
|
#define ARIZONA_INMODE_SE 1
|
|
#define ARIZONA_INMODE_DMIC 2
|
|
|
|
#define ARIZONA_MAX_OUTPUT 6
|
|
|
|
#define ARIZONA_MAX_AIF 3
|
|
|
|
#define ARIZONA_HAP_ACT_ERM 0
|
|
#define ARIZONA_HAP_ACT_LRA 2
|
|
|
|
#define ARIZONA_MAX_PDM_SPK 2
|
|
|
|
struct regulator_init_data;
|
|
|
|
struct arizona_micbias {
|
|
int mV; /** Regulated voltage */
|
|
unsigned int ext_cap:1; /** External capacitor fitted */
|
|
unsigned int discharge:1; /** Actively discharge */
|
|
unsigned int fast_start:1; /** Enable aggressive startup ramp rate */
|
|
};
|
|
|
|
struct arizona_micd_config {
|
|
unsigned int src;
|
|
unsigned int bias;
|
|
bool gpio;
|
|
};
|
|
|
|
struct arizona_pdata {
|
|
int reset; /** GPIO controlling /RESET, if any */
|
|
int ldoena; /** GPIO controlling LODENA, if any */
|
|
|
|
/** Regulator configuration for MICVDD */
|
|
struct regulator_init_data *micvdd;
|
|
|
|
/** Regulator configuration for LDO1 */
|
|
struct regulator_init_data *ldo1;
|
|
|
|
/** If a direct 32kHz clock is provided on an MCLK specify it here */
|
|
int clk32k_src;
|
|
|
|
bool irq_active_high; /** IRQ polarity */
|
|
|
|
/* Base GPIO */
|
|
int gpio_base;
|
|
|
|
/** Pin state for GPIO pins */
|
|
int gpio_defaults[ARIZONA_MAX_GPIO];
|
|
|
|
/**
|
|
* Maximum number of channels clocks will be generated for,
|
|
* useful for systems where and I2S bus with multiple data
|
|
* lines is mastered.
|
|
*/
|
|
int max_channels_clocked[ARIZONA_MAX_AIF];
|
|
|
|
/** GPIO5 is used for jack detection */
|
|
bool jd_gpio5;
|
|
|
|
/** Use the headphone detect circuit to identify the accessory */
|
|
bool hpdet_acc_id;
|
|
|
|
/** GPIO used for mic isolation with HPDET */
|
|
int hpdet_id_gpio;
|
|
|
|
/** GPIO for mic detection polarity */
|
|
int micd_pol_gpio;
|
|
|
|
/** Mic detect ramp rate */
|
|
int micd_bias_start_time;
|
|
|
|
/** Mic detect sample rate */
|
|
int micd_rate;
|
|
|
|
/** Mic detect debounce level */
|
|
int micd_dbtime;
|
|
|
|
/** Force MICBIAS on for mic detect */
|
|
bool micd_force_micbias;
|
|
|
|
/** Headset polarity configurations */
|
|
struct arizona_micd_config *micd_configs;
|
|
int num_micd_configs;
|
|
|
|
/** Reference voltage for DMIC inputs */
|
|
int dmic_ref[ARIZONA_MAX_INPUT];
|
|
|
|
/** MICBIAS configurations */
|
|
struct arizona_micbias micbias[ARIZONA_MAX_MICBIAS];
|
|
|
|
/** Mode of input structures */
|
|
int inmode[ARIZONA_MAX_INPUT];
|
|
|
|
/** Mode for outputs */
|
|
bool out_mono[ARIZONA_MAX_OUTPUT];
|
|
|
|
/** PDM speaker mute setting */
|
|
unsigned int spk_mute[ARIZONA_MAX_PDM_SPK];
|
|
|
|
/** PDM speaker format */
|
|
unsigned int spk_fmt[ARIZONA_MAX_PDM_SPK];
|
|
|
|
/** Haptic actuator type */
|
|
unsigned int hap_act;
|
|
};
|
|
|
|
#endif
|