diff options
| author | Wei WANG <wei_wang@realsil.com.cn> | 2013-08-20 02:18:52 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-08-20 04:22:00 -0400 |
| commit | 5947c167d145f32d4475d647a87e2af2699efe45 (patch) | |
| tree | b75c7a66d0c946c714ed141aff8f66839cd01f6a /include/linux | |
| parent | 773ccdfd9cc6f9bf8ec75a59fa742d7a663a5903 (diff) | |
mfd: rtsx: Add shutdown callback in rtsx_pci_driver
Some actions to clear power state should be handled in .shutdown
callback in rtsx_pci_driver. This patch adopts the following measures to
catch this goal:
1. Add a function rtsx_pci_power_off to abstract the common ops in
.shutdown and .suspend
2. Add pcr->ops->force_power_down to fulfill the individual action for
each reader model
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/rtsx_pci.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 9cba73703704..11ab786fdc83 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
| @@ -25,8 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
| 27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
| 28 | 28 | #include <linux/mfd/rtsx_common.h> | |
| 29 | #include "rtsx_common.h" | ||
| 30 | 29 | ||
| 31 | #define MAX_RW_REG_CNT 1024 | 30 | #define MAX_RW_REG_CNT 1024 |
| 32 | 31 | ||
| @@ -536,6 +535,10 @@ | |||
| 536 | #define SAMPLE_VAR_CLK0 (0x01 << 4) | 535 | #define SAMPLE_VAR_CLK0 (0x01 << 4) |
| 537 | #define SAMPLE_VAR_CLK1 (0x02 << 4) | 536 | #define SAMPLE_VAR_CLK1 (0x02 << 4) |
| 538 | 537 | ||
| 538 | /* HOST_SLEEP_STATE */ | ||
| 539 | #define HOST_ENTER_S1 1 | ||
| 540 | #define HOST_ENTER_S3 2 | ||
| 541 | |||
| 539 | #define MS_CFG 0xFD40 | 542 | #define MS_CFG 0xFD40 |
| 540 | #define MS_TPC 0xFD41 | 543 | #define MS_TPC 0xFD41 |
| 541 | #define MS_TRANS_CFG 0xFD42 | 544 | #define MS_TRANS_CFG 0xFD42 |
| @@ -701,6 +704,11 @@ | |||
| 701 | 704 | ||
| 702 | #define AUTOLOAD_CFG_BASE 0xFF00 | 705 | #define AUTOLOAD_CFG_BASE 0xFF00 |
| 703 | 706 | ||
| 707 | #define PM_CTRL1 0xFF44 | ||
| 708 | #define PM_CTRL2 0xFF45 | ||
| 709 | #define PM_CTRL3 0xFF46 | ||
| 710 | #define PM_CTRL4 0xFF47 | ||
| 711 | |||
| 704 | /* Memory mapping */ | 712 | /* Memory mapping */ |
| 705 | #define SRAM_BASE 0xE600 | 713 | #define SRAM_BASE 0xE600 |
| 706 | #define RBUF_BASE 0xF400 | 714 | #define RBUF_BASE 0xF400 |
| @@ -770,6 +778,7 @@ struct pcr_ops { | |||
| 770 | unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); | 778 | unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); |
| 771 | int (*conv_clk_and_div_n)(int clk, int dir); | 779 | int (*conv_clk_and_div_n)(int clk, int dir); |
| 772 | void (*fetch_vendor_settings)(struct rtsx_pcr *pcr); | 780 | void (*fetch_vendor_settings)(struct rtsx_pcr *pcr); |
| 781 | void (*force_power_down)(struct rtsx_pcr *pcr); | ||
| 773 | }; | 782 | }; |
| 774 | 783 | ||
| 775 | enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN}; | 784 | enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN}; |
