spi: Remove suspend and resume hooks from spi_driver_api
Drivers that implement power management should use the preferred device_pm_ops method instead. Change-Id: I337722b1e06afe8508b5c84c00c3542571232e07 Signed-off-by: Iván Briano <ivan.briano@intel.com>
This commit is contained in:
parent
bce65437c0
commit
fd8b0eaccb
6 changed files with 0 additions and 98 deletions
|
@ -371,24 +371,6 @@ static int spi_dw_transceive(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int spi_dw_suspend(struct device *dev)
|
||||
{
|
||||
SYS_LOG_DBG("device %p", dev);
|
||||
|
||||
_clock_off(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int spi_dw_resume(struct device *dev)
|
||||
{
|
||||
SYS_LOG_DBG("%p", dev);
|
||||
|
||||
_clock_on(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void spi_dw_isr(void *arg)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
|
@ -423,8 +405,6 @@ static struct spi_driver_api dw_spi_api = {
|
|||
.configure = spi_dw_configure,
|
||||
.slave_select = spi_dw_slave_select,
|
||||
.transceive = spi_dw_transceive,
|
||||
.suspend = spi_dw_suspend,
|
||||
.resume = spi_dw_resume,
|
||||
};
|
||||
|
||||
int spi_dw_init(struct device *dev)
|
||||
|
|
|
@ -333,17 +333,10 @@ out:
|
|||
completed(dev, error);
|
||||
}
|
||||
|
||||
static int toberemoved(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver_api intel_spi_api = {
|
||||
.configure = spi_intel_configure,
|
||||
.slave_select = NULL,
|
||||
.transceive = spi_intel_transceive,
|
||||
.suspend = toberemoved,
|
||||
.resume = toberemoved,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
|
|
|
@ -894,17 +894,10 @@ void spi_k64_isr(void *arg)
|
|||
spi_k64_complete(dev, error);
|
||||
}
|
||||
|
||||
static int toberemoved(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver_api k64_spi_api = {
|
||||
.configure = spi_k64_configure,
|
||||
.slave_select = spi_k64_slave_select,
|
||||
.transceive = spi_k64_transceive,
|
||||
.suspend = toberemoved,
|
||||
.resume = toberemoved,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -199,24 +199,10 @@ static int spi_qmsi_transceive(struct device *dev,
|
|||
return context->rc ? -EIO : 0;
|
||||
}
|
||||
|
||||
static int spi_qmsi_suspend(struct device *dev)
|
||||
{
|
||||
/* FIXME */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int spi_qmsi_resume(struct device *dev)
|
||||
{
|
||||
/* FIXME */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver_api spi_qmsi_api = {
|
||||
.configure = spi_qmsi_configure,
|
||||
.slave_select = spi_qmsi_slave_select,
|
||||
.transceive = spi_qmsi_transceive,
|
||||
.suspend = spi_qmsi_suspend,
|
||||
.resume = spi_qmsi_resume,
|
||||
};
|
||||
|
||||
static struct device *gpio_cs_init(struct spi_qmsi_config *config)
|
||||
|
|
|
@ -220,24 +220,10 @@ static int ss_spi_qmsi_transceive(struct device *dev,
|
|||
return context->rc ? -EIO : 0;
|
||||
}
|
||||
|
||||
static int ss_spi_qmsi_suspend(struct device *dev)
|
||||
{
|
||||
/* FIXME */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ss_spi_qmsi_resume(struct device *dev)
|
||||
{
|
||||
/* FIXME */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver_api ss_spi_qmsi_api = {
|
||||
.configure = ss_spi_qmsi_configure,
|
||||
.slave_select = ss_spi_qmsi_slave_select,
|
||||
.transceive = ss_spi_qmsi_transceive,
|
||||
.suspend = ss_spi_qmsi_suspend,
|
||||
.resume = ss_spi_qmsi_resume,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SPI_CS_GPIO
|
||||
|
|
|
@ -98,19 +98,11 @@ typedef int (*spi_api_slave_select)(struct device *dev, uint32_t slave);
|
|||
typedef int (*spi_api_io)(struct device *dev,
|
||||
const void *tx_buf, uint32_t tx_buf_len,
|
||||
void *rx_buf, uint32_t rx_buf_len);
|
||||
/**
|
||||
* @typedef spi_api_control
|
||||
* @brief Callback API upon for suspend/resume
|
||||
* See spi_suspend() and spi_resume() for argument description
|
||||
*/
|
||||
typedef int (*spi_api_control)(struct device *dev);
|
||||
|
||||
struct spi_driver_api {
|
||||
spi_api_configure configure;
|
||||
spi_api_slave_select slave_select;
|
||||
spi_api_io transceive;
|
||||
spi_api_control suspend;
|
||||
spi_api_control resume;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -211,34 +203,6 @@ static inline int spi_transceive(struct device *dev,
|
|||
return api->transceive(dev, tx_buf, tx_buf_len, rx_buf, rx_buf_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Suspend the SPI host controller operations.
|
||||
* @param dev Pointer to the device structure for the driver instance.
|
||||
*
|
||||
* @retval 0 If successful.
|
||||
* @retval Negative errno code if failure.
|
||||
*/
|
||||
static inline int spi_suspend(struct device *dev)
|
||||
{
|
||||
struct spi_driver_api *api = (struct spi_driver_api *)dev->driver_api;
|
||||
|
||||
return api->suspend(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Resume the SPI host controller operations.
|
||||
* @param dev Pointer to the device structure for the driver instance.
|
||||
*
|
||||
* @retval 0 If successful.
|
||||
* @retval Negative errno code if failure.
|
||||
*/
|
||||
static inline int spi_resume(struct device *dev)
|
||||
{
|
||||
struct spi_driver_api *api = (struct spi_driver_api *)dev->driver_api;
|
||||
|
||||
return api->resume(dev);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue