#include <linux/regulator/machine.h>
#include <linux/regmap.h>
#include <linux/delay.h>
+#include <linux/syscore_ops.h>
struct ricoh619 *g_ricoh619;
struct sleep_control_data {
}
static struct i2c_client *ricoh619_i2c_client;
-static void ricoh619_device_shutdown(struct i2c_client *client)
+static void ricoh619_device_shutdown(void)
{
int ret;
uint8_t val;
ret = ricoh619_write(ricoh619->dev, RICOH619_INTC_INTEN, 0);
ret = ricoh619_clr_bits(ricoh619->dev,RICOH619_PWR_REP_CNT,(0x1<<0));//Not repeat power ON after power off(Power Off/N_OE)
mutex_lock(&ricoh619->io_lock);
- msleep(100);
+ mdelay(100);
}
EXPORT_SYMBOL_GPL(ricoh619_device_shutdown);
static void ricoh619_power_off(void)
}
#endif
+static struct syscore_ops ricoh619_syscore_ops = {
+ .shutdown = ricoh619_device_shutdown,
+};
+
static void ricoh619_noe_init(struct ricoh619 *ricoh)
{
int ret;
ricoh619_debuginit(ricoh619);
ricoh619_i2c_client = client;
+ register_syscore_ops(&ricoh619_syscore_ops);
return 0;
err:
mfd_remove_devices(ricoh619->dev);
static int ricoh619_i2c_remove(struct i2c_client *client)
{
struct ricoh619 *ricoh619 = i2c_get_clientdata(client);
+
+ unregister_syscore_ops(&ricoh619_syscore_ops);
ricoh619_remove_subdevs(ricoh619);
return 0;
}
},
.probe = ricoh619_i2c_probe,
.remove = ricoh619_i2c_remove,
- .shutdown = ricoh619_device_shutdown,
.id_table = ricoh619_i2c_id,
};