Skip to content

Commit

Permalink
mfd: mc13xxx: add codec platform data
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Philippe Rétornaz authored and Mark Brown committed May 18, 2012
1 parent fe33d4c commit e3a0871
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mfd/mc13xxx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,8 @@ static int mc13xxx_probe(struct spi_device *spi)
mc13xxx_add_subdevice(mc13xxx, "%s-adc");

if (mc13xxx->flags & MC13XXX_USE_CODEC)
mc13xxx_add_subdevice(mc13xxx, "%s-codec");
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-codec",
pdata->codec, sizeof(*pdata->codec));

if (mc13xxx->flags & MC13XXX_USE_RTC)
mc13xxx_add_subdevice(mc13xxx, "%s-rtc");
Expand Down
11 changes: 11 additions & 0 deletions include/linux/mfd/mc13xxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ struct mc13xxx_ts_platform_data {
bool atox;
};

enum mc13783_ssi_port {
MC13783_SSI1_PORT,
MC13783_SSI2_PORT,
};

struct mc13xxx_codec_platform_data {
enum mc13783_ssi_port adc_ssi_port;
enum mc13783_ssi_port dac_ssi_port;
};

struct mc13xxx_platform_data {
#define MC13XXX_USE_TOUCHSCREEN (1 << 0)
#define MC13XXX_USE_CODEC (1 << 1)
Expand All @@ -181,6 +191,7 @@ struct mc13xxx_platform_data {
struct mc13xxx_leds_platform_data *leds;
struct mc13xxx_buttons_platform_data *buttons;
struct mc13xxx_ts_platform_data touch;
struct mc13xxx_codec_platform_data *codec;
};

#define MC13XXX_ADC_MODE_TS 1
Expand Down

0 comments on commit e3a0871

Please sign in to comment.