This driver provides support for driving the pins in output
mode only. Input mode is not supported.
- config GPIO_AB8500
- bool "ST-Ericsson AB8500 Mixed Signal Circuit gpio functions"
- depends on AB8500_CORE && BROKEN
- help
- Select this to enable the AB8500 IC GPIO driver
-
+config GPIO_PALMAS
+ bool "TI PALMAS series PMICs GPIO"
+ depends on MFD_PALMAS
+ help
+ Select this option to enable GPIO driver for the TI PALMAS
+ series chip family.
+
config GPIO_TPS6586X
bool "TPS6586X GPIO"
depends on MFD_TPS6586X
}
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
- if (!res) {
- ret = -ENOENT;
- goto out;
- }
+ if (!res)
+ return -ENOENT;
irq = platform_get_irq(dev, 0);
- if (irq < 0) {
- ret = irq;
- goto out;
- }
+ if (irq < 0)
+ return irq;
secondary_irq = platform_get_irq(dev, 1);
- if (secondary_irq >= 0 && !pdata->get_secondary_status) {
- ret = -EINVAL;
- goto out;
- }
+ if (secondary_irq >= 0 && !pdata->get_secondary_status)
+ return -EINVAL;
- base = devm_request_and_ioremap(&dev->dev, res);
- if (!base)
- return -ENOMEM;
+ base = devm_ioremap_resource(&dev->dev, res);
- if (IS_ERR(base)) {
- ret = PTR_ERR(base);
- goto out;
- }
++ if (IS_ERR(base))
++ return PTR_ERR(base);
clk = devm_clk_get(&dev->dev, NULL);
- if (IS_ERR(clk)) {
- ret = PTR_ERR(clk);
- goto out;
- }
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
clk_prepare(clk);
nmk_chip = devm_kzalloc(&dev->dev, sizeof(*nmk_chip), GFP_KERNEL);
struct ab8500_regulator_reg_init *regulator_reg_init;
int num_regulator;
struct regulator_init_data *regulator;
- struct ab8500_gpio_platform_data *gpio;
+ struct abx500_gpio_platform_data *gpio;
struct ab8500_codec_platform_data *codec;
+ struct ab8500_sysctrl_platform_data *sysctrl;
};
extern int ab8500_init(struct ab8500 *ab8500,
return (is_ab9540(ab) && (ab->chip_id == AB8500_CUT2P0));
}
+ /*
+ * Be careful, the marketing name for this chip is 2.1
+ * but the value read from the chip is 3.0 (0x30)
+ */
+ static inline int is_ab9540_3p0(struct ab8500 *ab)
+ {
+ return (is_ab9540(ab) && (ab->chip_id == AB8500_CUT3P0));
+ }
+
+ static inline int is_ab8540_1p0_or_earlier(struct ab8500 *ab)
+ {
+ return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P0);
+ }
+
+ static inline int is_ab8540_1p1_or_earlier(struct ab8500 *ab)
+ {
+ return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P1);
+ }
+
+ static inline int is_ab8540_1p2_or_earlier(struct ab8500 *ab)
+ {
+ return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P2);
+ }
+
+ static inline int is_ab8540_2p0_or_earlier(struct ab8500 *ab)
+ {
+ return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT2P0);
+ }
+
+ static inline int is_ab8540_2p0(struct ab8500 *ab)
+ {
+ return is_ab8540(ab) && (ab->chip_id == AB8500_CUT2P0);
+ }
+
+ static inline int is_ab8505_2p0_earlier(struct ab8500 *ab)
+ {
+ return (is_ab8505(ab) && (ab->chip_id < AB8500_CUT2P0));
+ }
+
+ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab)
+ {
+ return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0));
+ }
+
+#ifdef CONFIG_AB8500_DEBUG
+void ab8500_dump_all_banks(struct device *dev);
+void ab8500_debug_register_interrupt(int line);
+#else
+static inline void ab8500_dump_all_banks(struct device *dev) {}
+static inline void ab8500_debug_register_interrupt(int line) {}
+#endif
+
#endif /* MFD_AB8500_H */