aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
ModeNameSize
-rw-r--r--Kconfig42589logstatsplainblame
-rw-r--r--Kconfig.debug2564logstatsplainblame
-rw-r--r--Makefile21398logstatsplainblame
d---------arc497logstatsplain
d---------au1000333logstatsplain
d---------boot149logstatsplain
d---------cobalt217logstatsplain
d---------configs1687logstatsplain
d---------ddb5xxx135logstatsplain
d---------dec433logstatsplain
-rw-r--r--defconfig18490logstatsplainblame
d---------galileo-boards / ev9610034logstatsplain
d---------gt64120108logstatsplain
d---------ite-boards102logstatsplain
d---------jazz249logstatsplain
d---------jmr392769logstatsplain
d---------kernel2241logstatsplain
d---------lasat693logstatsplain
d---------lib-32229logstatsplain
d---------lib-64187logstatsplain
d---------lib358logstatsplain
d---------math-emu1759logstatsplain
d---------mips-boards129logstatsplain
d---------mm1229logstatsplain
d---------momentum142logstatsplain
d---------oprofile189logstatsplain
d---------pci2536logstatsplain
d---------pmc-sierra / yosemite35logstatsplain
d---------sgi-ip22424logstatsplain
d---------sgi-ip27670logstatsplain
d---------sgi-ip32312logstatsplain
d---------sibyte95logstatsplain
d---------sni222logstatsplain
d---------tx492776logstatsplain
d---------vr418166logstatsplain
d---------vr41xx306logstatsplain
ss="hl opt">.attr, &dev_attr_lux0_input.attr, NULL }; static struct attribute_group m_als_gr = { .name = "isl29020", .attrs = mid_att_als }; static int als_set_default_config(struct i2c_client *client) { int retval; retval = i2c_smbus_write_byte_data(client, 0x00, 0xc0); if (retval < 0) { dev_err(&client->dev, "default write failed."); return retval; } return 0; } static int isl29020_probe(struct i2c_client *client, const struct i2c_device_id *id) { int res; res = als_set_default_config(client); if (res < 0) return res; res = sysfs_create_group(&client->dev.kobj, &m_als_gr); if (res) { dev_err(&client->dev, "isl29020: device create file failed\n"); return res; } dev_info(&client->dev, "%s isl29020: ALS chip found\n", client->name); als_set_power_state(client, 0); pm_runtime_enable(&client->dev); return res; } static int isl29020_remove(struct i2c_client *client) { sysfs_remove_group(&client->dev.kobj, &m_als_gr); return 0; } static struct i2c_device_id isl29020_id[] = { { "isl29020", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, isl29020_id); #ifdef CONFIG_PM static int isl29020_runtime_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); als_set_power_state(client, 0); return 0; } static int isl29020_runtime_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); als_set_power_state(client, 1); return 0; } static const struct dev_pm_ops isl29020_pm_ops = { .runtime_suspend = isl29020_runtime_suspend, .runtime_resume = isl29020_runtime_resume, }; #define ISL29020_PM_OPS (&isl29020_pm_ops) #else /* CONFIG_PM */ #define ISL29020_PM_OPS NULL #endif /* CONFIG_PM */ static struct i2c_driver isl29020_driver = { .driver = { .name = "isl29020", .pm = ISL29020_PM_OPS, }, .probe = isl29020_probe, .remove = isl29020_remove, .id_table = isl29020_id, }; module_i2c_driver(isl29020_driver); MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com>"); MODULE_DESCRIPTION("Intersil isl29020 ALS Driver"); MODULE_LICENSE("GPL v2");