diff options
author | Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> | 2011-09-26 21:19:13 +0530 |
---|---|---|
committer | Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | 2011-09-30 12:12:51 +0200 |
commit | 8b322de9614db8411139b3c8804282d390ec3db7 (patch) | |
tree | 233a000594903c778398fafc942d7f33aa6cfff7 | |
parent | 7076f3f9150973c05f8687cc5b97b8944350f54b (diff) |
input:misc: Remove TVout support in accessory driver
The TVout hardware block is not used, so
remove the related code.
ST-Ericsson ID: 355539
ST-Ericsson Linux next: 344984
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I0f0f39b13f5b48de6096d076b9dd5253a3c14346
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32003
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r-- | arch/arm/mach-ux500/include/mach/abx500-accdet.h | 4 | ||||
-rw-r--r-- | drivers/input/misc/ab5500-accdet.c | 89 | ||||
-rw-r--r-- | drivers/input/misc/ab8500-accdet.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/abx500-accdet.c | 11 | ||||
-rwxr-xr-x | drivers/mfd/ab5500-core.c | 14 |
5 files changed, 1 insertions, 119 deletions
diff --git a/arch/arm/mach-ux500/include/mach/abx500-accdet.h b/arch/arm/mach-ux500/include/mach/abx500-accdet.h index 5698336e4cf..17c0d3026f8 100644 --- a/arch/arm/mach-ux500/include/mach/abx500-accdet.h +++ b/arch/arm/mach-ux500/include/mach/abx500-accdet.h @@ -283,7 +283,6 @@ struct accessory_detect_task { * @config_hw_test_plug_connected: Call back to configure the hw for * accessory detection. * @set_av_switch: Call back to configure the switch for tvout or audioout. - * @startup: Call back to do the Chip specific initialization. * @get_platform_data: call to get platform specific data. */ struct abx500_ad { @@ -320,8 +319,6 @@ struct abx500_ad { struct accessory_regu_descriptor *regu_desc; int no_of_regu_desc; - bool tv_out_connected; - void (*config_accdetect2_hw)(struct abx500_ad *, int); void (*config_accdetect1_hw)(struct abx500_ad *, int); int (*detect_plugged_in)(struct abx500_ad *); @@ -333,7 +330,6 @@ struct abx500_ad { void (*config_hw_test_plug_connected)(struct abx500_ad *dd, int enable); void (*set_av_switch)(struct abx500_ad *dd, enum accessory_avcontrol_dir dir); - int (*startup)(struct abx500_ad *dd); struct abx500_accdet_platform_data * (*get_platform_data)(struct platform_device *pdev); }; diff --git a/drivers/input/misc/ab5500-accdet.c b/drivers/input/misc/ab5500-accdet.c index 9858d93a475..828ff29cb1e 100644 --- a/drivers/input/misc/ab5500-accdet.c +++ b/drivers/input/misc/ab5500-accdet.c @@ -28,8 +28,6 @@ #define AB5500_ACC_DET_CTRL_REG 0x23 #define AB5500_VDENC_CTRL0 0x80 -#define ENABLE_TV_PLUG_DETECT 0x01 - /* REGISTER: AB8500_ACC_DET_CTRL_REG */ #define BITS_ACCDETCTRL2_ENA (0x20 | 0x10 | 0x08) #define BITS_ACCDETCTRL1_ENA (0x02 | 0x01) @@ -243,97 +241,11 @@ static void ab5500_turn_on_accdet_comparator(struct platform_device *pdev) acc_det_ctrl_suspend_val); } -irqreturn_t plug_tv_connect_irq_handler(int irq, void *_userdata) -{ - struct abx500_ad *dd = _userdata; - - dev_dbg(&dd->pdev->dev, "%s: Enter (irq=%d)\n", __func__, irq); - - dd->tv_out_connected = true; - report_jack_status(dd); - - return IRQ_HANDLED; -} - -irqreturn_t plug_tv_removal_irq_handler(int irq, void *_userdata) -{ - struct abx500_ad *dd = _userdata; - - dev_dbg(&dd->pdev->dev, "%s: Enter (irq=%d)\n", __func__, irq); - - dd->tv_out_connected = false; - report_jack_status(dd); - - return IRQ_HANDLED; -} - static void *ab5500_accdet_abx500_gpadc_get(void) { return ab5500_gpadc_get("ab5500-adc.0"); } -static int ab5500_startup(struct abx500_ad *dd) -{ - int ret; - int irq, irq_removal; - - irq = platform_get_irq_byname(dd->pdev, - "plugTVdet"); - if (irq < 0) { - dev_err(&dd->pdev->dev, "%s: Failed to get irq plugTVdet \n", - __func__); - return irq; - } - - irq_removal = platform_get_irq_byname(dd->pdev, - "plugTVdet_removal"); - if (irq_removal < 0) { - dev_err(&dd->pdev->dev, "%s: Failed to get irq" - "plugTVdet_removal \n", __func__); - return irq_removal; - } - - ret = request_threaded_irq(irq, NULL, - plug_tv_connect_irq_handler, - IRQF_NO_SUSPEND | IRQF_SHARED, - "plugTVdet", - dd); - if (ret != 0) { - dev_err(&dd->pdev->dev, - "%s: Failed to claim irq plugTVdet (%d)\n", - __func__, ret); - return ret; - } - - ret = request_threaded_irq(irq_removal, NULL, - plug_tv_removal_irq_handler, - IRQF_NO_SUSPEND | IRQF_SHARED, - "plugTVdet_removal", - dd); - if (ret != 0) { - dev_err(&dd->pdev->dev, - "%s: Failed to claim irq plugTVdet_removal (%d)\n", - __func__, ret); - goto req_irq_fail; - } - - ret = abx500_set_register_interruptible(&dd->pdev->dev, - AB5500_BANK_VDENC, AB5500_VDENC_CTRL0, - ENABLE_TV_PLUG_DETECT); - if (ret < 0) { - dev_err(&dd->pdev->dev, - "%s: Failed to update reg (%d).\n", __func__, ret); - goto ab_write_fail; - } - - return 0; - -req_irq_fail: -ab_write_fail: - free_irq(irq, dd); - return ret; -} - struct abx500_accdet_platform_data * ab5500_get_platform_data(struct platform_device *pdev) { @@ -355,7 +267,6 @@ struct abx500_ad ab5500_accessory_det_callbacks = { .turn_on_accdet_comparator = ab5500_turn_on_accdet_comparator, .accdet_abx500_gpadc_get = ab5500_accdet_abx500_gpadc_get, .config_hw_test_plug_connected = ab5500_config_hw_test_plug_connected, - .startup = ab5500_startup, .set_av_switch = NULL, .get_platform_data = ab5500_get_platform_data, }; diff --git a/drivers/input/misc/ab8500-accdet.c b/drivers/input/misc/ab8500-accdet.c index 80b7ded7f27..9bd52183a26 100644 --- a/drivers/input/misc/ab8500-accdet.c +++ b/drivers/input/misc/ab8500-accdet.c @@ -397,9 +397,7 @@ struct abx500_ad ab8500_accessory_det_callbacks = { .turn_on_accdet_comparator = ab8500_turn_on_accdet_comparator, .accdet_abx500_gpadc_get = ab8500_accdet_abx500_gpadc_get, .config_hw_test_plug_connected = ab8500_config_hw_test_plug_connected, - .startup = NULL, .set_av_switch = ab8500_set_av_switch, - .tv_out_connected = false, .get_platform_data = ab8500_get_platform_data, }; diff --git a/drivers/input/misc/abx500-accdet.c b/drivers/input/misc/abx500-accdet.c index 5e4d30ae1a7..b0879b6c96a 100644 --- a/drivers/input/misc/abx500-accdet.c +++ b/drivers/input/misc/abx500-accdet.c @@ -276,9 +276,6 @@ void report_jack_status(struct abx500_ad *dd) { int value = 0; - if (dd->tv_out_connected == true) - value = SND_JACK_VIDEOOUT; - /* Never report possible open cable */ if (dd->jack_type == JACK_TYPE_OPENCABLE) goto out; @@ -761,14 +758,6 @@ static int abx500_accessory_init(struct platform_device *pdev) goto fail_no_btn_input_dev; } - if (dd->startup) { - ret = dd->startup(dd); - if (ret < 0) { - dev_err(&pdev->dev, "Chip specific init failed\n"); - goto fail_no_regulators; - } - } - ret = create_regulators(dd); if (ret < 0) { dev_err(&pdev->dev, "%s: failed to create regulators\n", diff --git a/drivers/mfd/ab5500-core.c b/drivers/mfd/ab5500-core.c index eac3818f70d..0d39a0caff0 100755 --- a/drivers/mfd/ab5500-core.c +++ b/drivers/mfd/ab5500-core.c @@ -808,7 +808,7 @@ static struct mfd_cell ab5500_devs[AB5500_NUM_DEVICES] = { [AB5500_DEVID_ACCDET] = { .name = "ab5500-acc-det", .id = AB5500_DEVID_ACCDET, - .num_resources = 10, + .num_resources = 8, .resources = (struct resource[]) { { .name = "acc_detedt22db_rising", @@ -858,18 +858,6 @@ static struct mfd_cell ab5500_devs[AB5500_NUM_DEVICES] = { .start = AB5500_IRQ(3, 0), .end = AB5500_IRQ(3, 0), }, - { - .name = "plugTVdet", - .flags = IORESOURCE_IRQ, - .start = AB5500_IRQ(13, 7), - .end = AB5500_IRQ(13, 7), - }, - { - .name = "plugTVdet_removal", - .flags = IORESOURCE_IRQ, - .start = AB5500_IRQ(23, 2), - .end = AB5500_IRQ(23, 2), - }, }, }, }; |