Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3a4
- > * Copyright 2011, Michael Richter (alias neldar)
- 43c44
- < #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_BLN
- ---
- > #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
- 48c49
- < bool bln_notification_ongoing= false; // indicates ongoing LED Notification
- ---
- > bool BacklightNotification_ongoing= false; // indicates ongoing LED Notification
- 50c51
- < struct cypress_touchkey_devdata *bln_devdata; // keep a reference to the devdata
- ---
- > struct cypress_touchkey_devdata *blndevdata; // keep a reference to the devdata
- 69c70
- < int retry = 2;
- ---
- > int retry = 5;
- 78d78
- < if (!retry--) {
- 79a80
- > if (!retry--)
- 81d81
- < }
- 93d92
- < unsigned long flags;
- 100d98
- < if (!retry--) {
- 101a100
- > if (!retry--)
- 103d101
- < }
- 202a201,202
- > dev_dbg(&devdata->client->dev, "%s: ignoring spurious boot "
- > "interrupt\n", __func__);
- 222c222,223
- < #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_BLN
- ---
- >
- > #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
- 227c228
- < if(!bln_notification_ongoing)
- ---
- > if(!BacklightNotification_ongoing)
- 253c254,264
- < #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_BLN
- ---
- > static void touchkey_power_on(void){
- > blndevdata->pdata->touchkey_onoff(TOUCHKEY_ON);
- > mdelay(50);
- > }
- >
- > static void touchkey_power_off(void){
- > blndevdata->pdata->touchkey_onoff(TOUCHKEY_OFF);
- > mdelay(30);
- > }
- >
- > #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
- 257c268
- < i2c_touchkey_write_byte(bln_devdata, bln_devdata->backlight_on);
- ---
- > i2c_touchkey_write_byte(blndevdata, blndevdata->backlight_on);
- 261c272
- < i2c_touchkey_write_byte(bln_devdata, bln_devdata->backlight_off);
- ---
- > i2c_touchkey_write_byte(blndevdata, blndevdata->backlight_off);
- 267,270c278
- < pr_info("%s: bln interface enabled\n", __FUNCTION__); //remove me
- <
- < if (bln_devdata->is_powering_on){
- < pr_info("%s: not in touchmode\n", __FUNCTION__); //remove me
- ---
- > if (blndevdata->is_powering_on){
- 272c280,283
- < bln_notification_ongoing = true;
- ---
- > BacklightNotification_ongoing = true;
- >
- > /* reconfigure gpio for sleep mode */
- > blndevdata->pdata->touchkey_sleep_onoff(TOUCHKEY_ON);
- 280,281c291
- < pr_info("%s: enable vdd\n", __FUNCTION__); //remove me
- < bln_devdata->pdata->touchkey_onoff(TOUCHKEY_ON);
- ---
- > blndevdata->pdata->touchkey_onoff(TOUCHKEY_ON);
- 284d293
- < pr_info("%s: enable lights\n", __FUNCTION__); //remove me
- 299a309,314
- > /*
- > * reconfigure gpio for sleep mode, this has to be done
- > * independently from the power status
- > */
- > blndevdata->pdata->touchkey_sleep_onoff(TOUCHKEY_OFF);
- >
- 301c316
- < if (bln_devdata->is_powering_on){
- ---
- > if (blndevdata->is_powering_on){
- 302a318,326
- >
- > #if 0
- > /*
- > * power off the touchkey controller
- > * This is actually not needed, the early_suspend function
- > * should take care of powering off the touchkey controller
- > */
- > blndevdata->pdata->touchkey_onoff(TOUCHKEY_OFF);
- > #endif
- 306c330
- < bln_notification_ongoing = false;
- ---
- > BacklightNotification_ongoing = false;
- 327c351
- < if (bln_notification_ongoing)
- ---
- > if (BacklightNotification_ongoing)
- 341c365
- < return sprintf(buf,"%u\n", (bln_notification_ongoing ? 1 : 0));
- ---
- > return sprintf(buf,"%u\n", (BacklightNotification_ongoing ? 1 : 0));
- 375c399
- < if (bln_notification_ongoing){
- ---
- > if (BacklightNotification_ongoing){
- 405c429
- < static struct attribute *bln_interface_attributes[] = {
- ---
- > static struct attribute *bln_notification_attributes[] = {
- 413,414c437,438
- < static struct attribute_group bln_interface_attributes_group = {
- < .attrs = bln_interface_attributes,
- ---
- > static struct attribute_group bln_notification_group = {
- > .attrs = bln_notification_attributes,
- 529c553
- < #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_BLN
- ---
- > #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
- 537c561
- < * misc driver does not give access to it (or i missed that somewhere)
- ---
- > * misc driver does not give access to it (or i did miss that somewhere)
- 539c563
- < bln_devdata = devdata;
- ---
- > blndevdata = devdata;
- 542c566
- < if (sysfs_create_group(&backlightnotification_device.this_device->kobj, &bln_interface_attributes_group) < 0)
- ---
- > if (sysfs_create_group(&backlightnotification_device.this_device->kobj, &bln_notification_group) < 0)
- 568a593
- > /* dev_err(&client->dev, "%s: i2c_touchkey_remove\n", __func__);*/
- 570c595
- < #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_BLN
- ---
- > #ifdef CONFIG_KEYPAD_CYPRESS_TOUCH_USE_BLN
- 574d598
- < dev_err(&client->dev, "%s: i2c_touchkey_remove\n", __func__);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement