summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>2011-09-26 21:19:13 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:36 +0200
commit84b09a06a77caebbf9e367cb02e4c5e53ca1638a (patch)
treebeefbac9e90e66965763ec3218b79f5766a2e743
parent8e139dc96cffb128073cc996796c3193e22aefa4 (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.h4
-rw-r--r--drivers/input/misc/ab5500-accdet.c89
-rw-r--r--drivers/input/misc/ab8500-accdet.c2
-rw-r--r--drivers/input/misc/abx500-accdet.c11
4 files changed, 0 insertions, 106 deletions
diff --git a/arch/arm/mach-ux500/include/mach/abx500-accdet.h b/arch/arm/mach-ux500/include/mach/abx500-accdet.h
index 914a7087ddb..03c627f6011 100644
--- a/arch/arm/mach-ux500/include/mach/abx500-accdet.h
+++ b/arch/arm/mach-ux500/include/mach/abx500-accdet.h
@@ -280,7 +280,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 {
@@ -316,8 +315,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 *);
@@ -329,7 +326,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 35ddcc08e5f..5b51d2bd5e2 100644
--- a/drivers/input/misc/ab8500-accdet.c
+++ b/drivers/input/misc/ab8500-accdet.c
@@ -396,9 +396,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 717bbc09f8f..67403e5ae5d 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;
@@ -755,14 +752,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",