20 #include <linux/module.h>
21 #include <linux/i2c.h>
25 static int cma3000_i2c_set(
struct device *
dev,
34 "%s failed (%s, %d)\n", __func__, msg, ret);
38 static int cma3000_i2c_read(
struct device *dev,
u8 reg,
char *msg)
46 "%s failed (%s, %d)\n", __func__, msg, ret);
52 #define CMA3000_BUSI2C (0 << 4)
54 .read = cma3000_i2c_read,
55 .write = cma3000_i2c_set,
67 i2c_set_clientdata(client, data);
82 static int cma3000_i2c_suspend(
struct device *dev)
92 static int cma3000_i2c_resume(
struct device *dev)
102 static const struct dev_pm_ops cma3000_i2c_pm_ops = {
103 .
suspend = cma3000_i2c_suspend,
104 .resume = cma3000_i2c_resume,
109 {
"cma3000_d01", 0 },
115 static struct i2c_driver cma3000_i2c_driver = {
116 .probe = cma3000_i2c_probe,
118 .id_table = cma3000_i2c_id,
120 .
name =
"cma3000_i2c_accl",
123 .pm = &cma3000_i2c_pm_ops,