Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'char-misc-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull drivers/misc fix from Greg Kroah-Hartman:
"Here is a single revert for the ti-st misc driver, fixing problem that
was introduced in 3.7-rc1 that has been bothering people."

* tag 'char-misc-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
Revert "drivers/misc/ti-st: remove gpio handling"

+36 -1
+36 -1
drivers/misc/ti-st/st_kim.c
··· 468 468 if (pdata->chip_enable) 469 469 pdata->chip_enable(kim_gdata); 470 470 471 + /* Configure BT nShutdown to HIGH state */ 472 + gpio_set_value(kim_gdata->nshutdown, GPIO_LOW); 473 + mdelay(5); /* FIXME: a proper toggle */ 474 + gpio_set_value(kim_gdata->nshutdown, GPIO_HIGH); 475 + mdelay(100); 471 476 /* re-initialize the completion */ 472 477 INIT_COMPLETION(kim_gdata->ldisc_installed); 473 478 /* send notification to UIM */ ··· 514 509 * (b) upon failure to either install ldisc or download firmware. 515 510 * The function is responsible to (a) notify UIM about un-installation, 516 511 * (b) flush UART if the ldisc was installed. 517 - * (c) invoke platform's chip disabling routine. 512 + * (c) reset BT_EN - pull down nshutdown at the end. 513 + * (d) invoke platform's chip disabling routine. 518 514 */ 519 515 long st_kim_stop(void *kim_data) 520 516 { ··· 546 540 pr_err(" timed out waiting for ldisc to be un-installed"); 547 541 err = -ETIMEDOUT; 548 542 } 543 + 544 + /* By default configure BT nShutdown to LOW state */ 545 + gpio_set_value(kim_gdata->nshutdown, GPIO_LOW); 546 + mdelay(1); 547 + gpio_set_value(kim_gdata->nshutdown, GPIO_HIGH); 548 + mdelay(1); 549 + gpio_set_value(kim_gdata->nshutdown, GPIO_LOW); 549 550 550 551 /* platform specific disable */ 551 552 if (pdata->chip_disable) ··· 746 733 /* refer to itself */ 747 734 kim_gdata->core_data->kim_data = kim_gdata; 748 735 736 + /* Claim the chip enable nShutdown gpio from the system */ 737 + kim_gdata->nshutdown = pdata->nshutdown_gpio; 738 + err = gpio_request(kim_gdata->nshutdown, "kim"); 739 + if (unlikely(err)) { 740 + pr_err(" gpio %ld request failed ", kim_gdata->nshutdown); 741 + return err; 742 + } 743 + 744 + /* Configure nShutdown GPIO as output=0 */ 745 + err = gpio_direction_output(kim_gdata->nshutdown, 0); 746 + if (unlikely(err)) { 747 + pr_err(" unable to configure gpio %ld", kim_gdata->nshutdown); 748 + return err; 749 + } 749 750 /* get reference of pdev for request_firmware 750 751 */ 751 752 kim_gdata->kim_pdev = pdev; ··· 806 779 807 780 static int kim_remove(struct platform_device *pdev) 808 781 { 782 + /* free the GPIOs requested */ 783 + struct ti_st_plat_data *pdata = pdev->dev.platform_data; 809 784 struct kim_data_s *kim_gdata; 810 785 811 786 kim_gdata = dev_get_drvdata(&pdev->dev); 787 + 788 + /* Free the Bluetooth/FM/GPIO 789 + * nShutdown gpio from the system 790 + */ 791 + gpio_free(pdata->nshutdown_gpio); 792 + pr_info("nshutdown GPIO Freed"); 812 793 813 794 debugfs_remove_recursive(kim_debugfs_dir); 814 795 sysfs_remove_group(&pdev->dev.kobj, &uim_attr_grp);