mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
video: rockchip: mpp_osal: add api mpp_device_add_driver() for rockit
Signed-off-by: ChuanHu Sun <aaron.sun@rock-chips.com> Change-Id: I2f945004f199b61935a4a1f5a49cf2d1c1ec093b
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*
|
||||
*/
|
||||
#include "mpp_osal.h"
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
struct device_node *mpp_dev_of_node(struct device *dev)
|
||||
{
|
||||
@@ -28,3 +29,15 @@ int mpp_device_init_wakeup(struct device *dev, bool enable)
|
||||
return device_init_wakeup(dev, enable);
|
||||
}
|
||||
EXPORT_SYMBOL(mpp_device_init_wakeup);
|
||||
|
||||
void mpp_device_add_driver(void *dev, void *drv)
|
||||
{
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
struct device *kdev = (struct device *)dev;
|
||||
struct platform_driver *mpi_driver = (struct platform_driver *)drv;
|
||||
|
||||
kdev->driver = &mpi_driver->driver;
|
||||
kdev->power.no_pm_callbacks = 0;
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(mpp_device_add_driver);
|
||||
|
||||
@@ -14,5 +14,6 @@ struct device_node *mpp_dev_of_node(struct device *dev);
|
||||
void mpp_pm_relax(struct device *dev);
|
||||
void mpp_pm_stay_awake(struct device *dev);
|
||||
int mpp_device_init_wakeup(struct device *dev, bool enable);
|
||||
void mpp_device_add_driver(void *dev, void *drv);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user