Linux Audio

Check our new training course

Loading...
v6.8
  1// SPDX-License-Identifier: GPL-2.0-or-later
  2/*
  3 * HWMON Driver for Dialog DA9055
  4 *
  5 * Copyright(c) 2012 Dialog Semiconductor Ltd.
  6 *
  7 * Author: David Dajun Chen <dchen@diasemi.com>
 
 
 
 
 
 
  8 */
  9
 10#include <linux/delay.h>
 11#include <linux/err.h>
 12#include <linux/hwmon.h>
 13#include <linux/hwmon-sysfs.h>
 14#include <linux/init.h>
 15#include <linux/kernel.h>
 16#include <linux/module.h>
 17#include <linux/platform_device.h>
 18#include <linux/completion.h>
 19
 20#include <linux/mfd/da9055/core.h>
 21#include <linux/mfd/da9055/reg.h>
 22
 23#define DA9055_ADCIN_DIV	102
 24#define DA9055_VSYS_DIV	85
 25
 26#define DA9055_ADC_VSYS	0
 27#define DA9055_ADC_ADCIN1	1
 28#define DA9055_ADC_ADCIN2	2
 29#define DA9055_ADC_ADCIN3	3
 30#define DA9055_ADC_TJUNC	4
 31
 32struct da9055_hwmon {
 33	struct da9055	*da9055;
 
 34	struct mutex	hwmon_lock;
 35	struct mutex	irq_lock;
 36	struct completion done;
 37};
 38
 39static const char * const input_names[] = {
 40	[DA9055_ADC_VSYS]	= "VSYS",
 41	[DA9055_ADC_ADCIN1]	= "ADC IN1",
 42	[DA9055_ADC_ADCIN2]	= "ADC IN2",
 43	[DA9055_ADC_ADCIN3]	= "ADC IN3",
 44	[DA9055_ADC_TJUNC]	= "CHIP TEMP",
 45};
 46
 47static const u8 chan_mux[DA9055_ADC_TJUNC + 1] = {
 48	[DA9055_ADC_VSYS]	= DA9055_ADC_MUX_VSYS,
 49	[DA9055_ADC_ADCIN1]	= DA9055_ADC_MUX_ADCIN1,
 50	[DA9055_ADC_ADCIN2]	= DA9055_ADC_MUX_ADCIN2,
 51	[DA9055_ADC_ADCIN3]	= DA9055_ADC_MUX_ADCIN3,
 52	[DA9055_ADC_TJUNC]	= DA9055_ADC_MUX_T_SENSE,
 53};
 54
 55static int da9055_adc_manual_read(struct da9055_hwmon *hwmon,
 56					unsigned char channel)
 57{
 58	int ret;
 59	unsigned short calc_data;
 60	unsigned short data;
 61	unsigned char mux_sel;
 62	struct da9055 *da9055 = hwmon->da9055;
 63
 64	if (channel > DA9055_ADC_TJUNC)
 65		return -EINVAL;
 66
 67	mutex_lock(&hwmon->irq_lock);
 68
 69	/* Selects desired MUX for manual conversion */
 70	mux_sel = chan_mux[channel] | DA9055_ADC_MAN_CONV;
 71
 72	ret = da9055_reg_write(da9055, DA9055_REG_ADC_MAN, mux_sel);
 73	if (ret < 0)
 74		goto err;
 75
 76	/* Wait for an interrupt */
 77	if (!wait_for_completion_timeout(&hwmon->done,
 78					msecs_to_jiffies(500))) {
 79		dev_err(da9055->dev,
 80			"timeout waiting for ADC conversion interrupt\n");
 81		ret = -ETIMEDOUT;
 82		goto err;
 83	}
 84
 85	ret = da9055_reg_read(da9055, DA9055_REG_ADC_RES_H);
 86	if (ret < 0)
 87		goto err;
 88
 89	calc_data = (unsigned short)ret;
 90	data = calc_data << 2;
 91
 92	ret = da9055_reg_read(da9055, DA9055_REG_ADC_RES_L);
 93	if (ret < 0)
 94		goto err;
 95
 96	calc_data = (unsigned short)(ret & DA9055_ADC_LSB_MASK);
 97	data |= calc_data;
 98
 99	ret = data;
100
101err:
102	mutex_unlock(&hwmon->irq_lock);
103	return ret;
104}
105
106static irqreturn_t da9055_auxadc_irq(int irq, void *irq_data)
107{
108	struct da9055_hwmon *hwmon = irq_data;
109
110	complete(&hwmon->done);
111
112	return IRQ_HANDLED;
113}
114
115/* Conversion function for VSYS and ADCINx */
116static inline int volt_reg_to_mv(int value, int channel)
117{
118	if (channel == DA9055_ADC_VSYS)
119		return DIV_ROUND_CLOSEST(value * 1000, DA9055_VSYS_DIV) + 2500;
120	else
121		return DIV_ROUND_CLOSEST(value * 1000, DA9055_ADCIN_DIV);
122}
123
124static int da9055_enable_auto_mode(struct da9055 *da9055, int channel)
125{
126
127	return da9055_reg_update(da9055, DA9055_REG_ADC_CONT, 1 << channel,
128				1 << channel);
129
130}
131
132static int da9055_disable_auto_mode(struct da9055 *da9055, int channel)
133{
134
135	return da9055_reg_update(da9055, DA9055_REG_ADC_CONT, 1 << channel, 0);
136}
137
138static ssize_t da9055_auto_ch_show(struct device *dev,
139				   struct device_attribute *devattr,
140				   char *buf)
141{
142	struct da9055_hwmon *hwmon = dev_get_drvdata(dev);
143	int ret, adc;
144	int channel = to_sensor_dev_attr(devattr)->index;
145
146	mutex_lock(&hwmon->hwmon_lock);
147
148	ret = da9055_enable_auto_mode(hwmon->da9055, channel);
149	if (ret < 0)
150		goto hwmon_err;
151
152	usleep_range(10000, 10500);
153
154	adc = da9055_reg_read(hwmon->da9055, DA9055_REG_VSYS_RES + channel);
155	if (adc < 0) {
156		ret = adc;
157		goto hwmon_err_release;
158	}
159
160	ret = da9055_disable_auto_mode(hwmon->da9055, channel);
161	if (ret < 0)
162		goto hwmon_err;
163
164	mutex_unlock(&hwmon->hwmon_lock);
165
166	return sprintf(buf, "%d\n", volt_reg_to_mv(adc, channel));
167
168hwmon_err_release:
169	da9055_disable_auto_mode(hwmon->da9055, channel);
170hwmon_err:
171	mutex_unlock(&hwmon->hwmon_lock);
172	return ret;
173}
174
175static ssize_t da9055_tjunc_show(struct device *dev,
176				 struct device_attribute *devattr, char *buf)
177{
178	struct da9055_hwmon *hwmon = dev_get_drvdata(dev);
179	int tjunc;
180	int toffset;
181
182	tjunc = da9055_adc_manual_read(hwmon, DA9055_ADC_TJUNC);
183	if (tjunc < 0)
184		return tjunc;
185
186	toffset = da9055_reg_read(hwmon->da9055, DA9055_REG_T_OFFSET);
187	if (toffset < 0)
188		return toffset;
189
190	/*
191	 * Degrees celsius = -0.4084 * (ADC_RES - T_OFFSET) + 307.6332
192	 * T_OFFSET is a trim value used to improve accuracy of the result
193	 */
194	return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(-4084 * (tjunc - toffset)
195							+ 3076332, 10000));
196}
197
198static ssize_t label_show(struct device *dev,
 
 
 
 
 
 
 
199			  struct device_attribute *devattr, char *buf)
200{
201	return sprintf(buf, "%s\n",
202		       input_names[to_sensor_dev_attr(devattr)->index]);
203}
204
205static SENSOR_DEVICE_ATTR_RO(in0_input, da9055_auto_ch, DA9055_ADC_VSYS);
206static SENSOR_DEVICE_ATTR_RO(in0_label, label, DA9055_ADC_VSYS);
207static SENSOR_DEVICE_ATTR_RO(in1_input, da9055_auto_ch, DA9055_ADC_ADCIN1);
208static SENSOR_DEVICE_ATTR_RO(in1_label, label, DA9055_ADC_ADCIN1);
209static SENSOR_DEVICE_ATTR_RO(in2_input, da9055_auto_ch, DA9055_ADC_ADCIN2);
210static SENSOR_DEVICE_ATTR_RO(in2_label, label, DA9055_ADC_ADCIN2);
211static SENSOR_DEVICE_ATTR_RO(in3_input, da9055_auto_ch, DA9055_ADC_ADCIN3);
212static SENSOR_DEVICE_ATTR_RO(in3_label, label, DA9055_ADC_ADCIN3);
 
 
 
 
 
 
 
 
 
 
 
 
 
213
214static SENSOR_DEVICE_ATTR_RO(temp1_input, da9055_tjunc, DA9055_ADC_TJUNC);
215static SENSOR_DEVICE_ATTR_RO(temp1_label, label, DA9055_ADC_TJUNC);
216
217static struct attribute *da9055_attrs[] = {
 
218	&sensor_dev_attr_in0_input.dev_attr.attr,
219	&sensor_dev_attr_in0_label.dev_attr.attr,
220	&sensor_dev_attr_in1_input.dev_attr.attr,
221	&sensor_dev_attr_in1_label.dev_attr.attr,
222	&sensor_dev_attr_in2_input.dev_attr.attr,
223	&sensor_dev_attr_in2_label.dev_attr.attr,
224	&sensor_dev_attr_in3_input.dev_attr.attr,
225	&sensor_dev_attr_in3_label.dev_attr.attr,
226
227	&sensor_dev_attr_temp1_input.dev_attr.attr,
228	&sensor_dev_attr_temp1_label.dev_attr.attr,
229	NULL
230};
231
232ATTRIBUTE_GROUPS(da9055);
233
234static int da9055_hwmon_probe(struct platform_device *pdev)
235{
236	struct device *dev = &pdev->dev;
237	struct da9055_hwmon *hwmon;
238	struct device *hwmon_dev;
239	int hwmon_irq, ret;
240
241	hwmon = devm_kzalloc(dev, sizeof(struct da9055_hwmon), GFP_KERNEL);
 
242	if (!hwmon)
243		return -ENOMEM;
244
245	mutex_init(&hwmon->hwmon_lock);
246	mutex_init(&hwmon->irq_lock);
247
248	init_completion(&hwmon->done);
249	hwmon->da9055 = dev_get_drvdata(pdev->dev.parent);
250
 
 
251	hwmon_irq = platform_get_irq_byname(pdev, "HWMON");
252	if (hwmon_irq < 0)
253		return hwmon_irq;
254
255	ret = devm_request_threaded_irq(&pdev->dev, hwmon_irq,
256					NULL, da9055_auxadc_irq,
257					IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
258					"adc-irq", hwmon);
259	if (ret != 0) {
260		dev_err(hwmon->da9055->dev, "DA9055 ADC IRQ failed ret=%d\n",
261			ret);
262		return ret;
263	}
264
265	hwmon_dev = devm_hwmon_device_register_with_groups(dev, "da9055",
266							   hwmon,
267							   da9055_groups);
268	return PTR_ERR_OR_ZERO(hwmon_dev);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269}
270
271static struct platform_driver da9055_hwmon_driver = {
272	.probe = da9055_hwmon_probe,
 
273	.driver = {
274		.name = "da9055-hwmon",
 
275	},
276};
277
278module_platform_driver(da9055_hwmon_driver);
279
280MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
281MODULE_DESCRIPTION("DA9055 HWMON driver");
282MODULE_LICENSE("GPL");
283MODULE_ALIAS("platform:da9055-hwmon");
v3.15
 
  1/*
  2 * HWMON Driver for Dialog DA9055
  3 *
  4 * Copyright(c) 2012 Dialog Semiconductor Ltd.
  5 *
  6 * Author: David Dajun Chen <dchen@diasemi.com>
  7 *
  8 *  This program is free software; you can redistribute  it and/or modify it
  9 *  under  the terms of  the GNU General  Public License as published by the
 10 *  Free Software Foundation;  either version 2 of the  License, or (at your
 11 *  option) any later version.
 12 *
 13 */
 14
 15#include <linux/delay.h>
 16#include <linux/err.h>
 17#include <linux/hwmon.h>
 18#include <linux/hwmon-sysfs.h>
 19#include <linux/init.h>
 20#include <linux/kernel.h>
 21#include <linux/module.h>
 22#include <linux/platform_device.h>
 23#include <linux/completion.h>
 24
 25#include <linux/mfd/da9055/core.h>
 26#include <linux/mfd/da9055/reg.h>
 27
 28#define DA9055_ADCIN_DIV	102
 29#define DA9055_VSYS_DIV	85
 30
 31#define DA9055_ADC_VSYS	0
 32#define DA9055_ADC_ADCIN1	1
 33#define DA9055_ADC_ADCIN2	2
 34#define DA9055_ADC_ADCIN3	3
 35#define DA9055_ADC_TJUNC	4
 36
 37struct da9055_hwmon {
 38	struct da9055	*da9055;
 39	struct device	*class_device;
 40	struct mutex	hwmon_lock;
 41	struct mutex	irq_lock;
 42	struct completion done;
 43};
 44
 45static const char * const input_names[] = {
 46	[DA9055_ADC_VSYS]	= "VSYS",
 47	[DA9055_ADC_ADCIN1]	= "ADC IN1",
 48	[DA9055_ADC_ADCIN2]	= "ADC IN2",
 49	[DA9055_ADC_ADCIN3]	= "ADC IN3",
 50	[DA9055_ADC_TJUNC]	= "CHIP TEMP",
 51};
 52
 53static const u8 chan_mux[DA9055_ADC_TJUNC + 1] = {
 54	[DA9055_ADC_VSYS]	= DA9055_ADC_MUX_VSYS,
 55	[DA9055_ADC_ADCIN1]	= DA9055_ADC_MUX_ADCIN1,
 56	[DA9055_ADC_ADCIN2]	= DA9055_ADC_MUX_ADCIN2,
 57	[DA9055_ADC_ADCIN3]	= DA9055_ADC_MUX_ADCIN3,
 58	[DA9055_ADC_TJUNC]	= DA9055_ADC_MUX_T_SENSE,
 59};
 60
 61static int da9055_adc_manual_read(struct da9055_hwmon *hwmon,
 62					unsigned char channel)
 63{
 64	int ret;
 65	unsigned short calc_data;
 66	unsigned short data;
 67	unsigned char mux_sel;
 68	struct da9055 *da9055 = hwmon->da9055;
 69
 70	if (channel > DA9055_ADC_TJUNC)
 71		return -EINVAL;
 72
 73	mutex_lock(&hwmon->irq_lock);
 74
 75	/* Selects desired MUX for manual conversion */
 76	mux_sel = chan_mux[channel] | DA9055_ADC_MAN_CONV;
 77
 78	ret = da9055_reg_write(da9055, DA9055_REG_ADC_MAN, mux_sel);
 79	if (ret < 0)
 80		goto err;
 81
 82	/* Wait for an interrupt */
 83	if (!wait_for_completion_timeout(&hwmon->done,
 84					msecs_to_jiffies(500))) {
 85		dev_err(da9055->dev,
 86			"timeout waiting for ADC conversion interrupt\n");
 87		ret = -ETIMEDOUT;
 88		goto err;
 89	}
 90
 91	ret = da9055_reg_read(da9055, DA9055_REG_ADC_RES_H);
 92	if (ret < 0)
 93		goto err;
 94
 95	calc_data = (unsigned short)ret;
 96	data = calc_data << 2;
 97
 98	ret = da9055_reg_read(da9055, DA9055_REG_ADC_RES_L);
 99	if (ret < 0)
100		goto err;
101
102	calc_data = (unsigned short)(ret & DA9055_ADC_LSB_MASK);
103	data |= calc_data;
104
105	ret = data;
106
107err:
108	mutex_unlock(&hwmon->irq_lock);
109	return ret;
110}
111
112static irqreturn_t da9055_auxadc_irq(int irq, void *irq_data)
113{
114	struct da9055_hwmon *hwmon = irq_data;
115
116	complete(&hwmon->done);
117
118	return IRQ_HANDLED;
119}
120
121/* Conversion function for VSYS and ADCINx */
122static inline int volt_reg_to_mv(int value, int channel)
123{
124	if (channel == DA9055_ADC_VSYS)
125		return DIV_ROUND_CLOSEST(value * 1000, DA9055_VSYS_DIV) + 2500;
126	else
127		return DIV_ROUND_CLOSEST(value * 1000, DA9055_ADCIN_DIV);
128}
129
130static int da9055_enable_auto_mode(struct da9055 *da9055, int channel)
131{
132
133	return da9055_reg_update(da9055, DA9055_REG_ADC_CONT, 1 << channel,
134				1 << channel);
135
136}
137
138static int da9055_disable_auto_mode(struct da9055 *da9055, int channel)
139{
140
141	return da9055_reg_update(da9055, DA9055_REG_ADC_CONT, 1 << channel, 0);
142}
143
144static ssize_t da9055_read_auto_ch(struct device *dev,
145				struct device_attribute *devattr, char *buf)
 
146{
147	struct da9055_hwmon *hwmon = dev_get_drvdata(dev);
148	int ret, adc;
149	int channel = to_sensor_dev_attr(devattr)->index;
150
151	mutex_lock(&hwmon->hwmon_lock);
152
153	ret = da9055_enable_auto_mode(hwmon->da9055, channel);
154	if (ret < 0)
155		goto hwmon_err;
156
157	usleep_range(10000, 10500);
158
159	adc = da9055_reg_read(hwmon->da9055, DA9055_REG_VSYS_RES + channel);
160	if (adc < 0) {
161		ret = adc;
162		goto hwmon_err_release;
163	}
164
165	ret = da9055_disable_auto_mode(hwmon->da9055, channel);
166	if (ret < 0)
167		goto hwmon_err;
168
169	mutex_unlock(&hwmon->hwmon_lock);
170
171	return sprintf(buf, "%d\n", volt_reg_to_mv(adc, channel));
172
173hwmon_err_release:
174	da9055_disable_auto_mode(hwmon->da9055, channel);
175hwmon_err:
176	mutex_unlock(&hwmon->hwmon_lock);
177	return ret;
178}
179
180static ssize_t da9055_read_tjunc(struct device *dev,
181				 struct device_attribute *devattr, char *buf)
182{
183	struct da9055_hwmon *hwmon = dev_get_drvdata(dev);
184	int tjunc;
185	int toffset;
186
187	tjunc = da9055_adc_manual_read(hwmon, DA9055_ADC_TJUNC);
188	if (tjunc < 0)
189		return tjunc;
190
191	toffset = da9055_reg_read(hwmon->da9055, DA9055_REG_T_OFFSET);
192	if (toffset < 0)
193		return toffset;
194
195	/*
196	 * Degrees celsius = -0.4084 * (ADC_RES - T_OFFSET) + 307.6332
197	 * T_OFFSET is a trim value used to improve accuracy of the result
198	 */
199	return sprintf(buf, "%d\n", DIV_ROUND_CLOSEST(-4084 * (tjunc - toffset)
200							+ 3076332, 10000));
201}
202
203static ssize_t da9055_hwmon_show_name(struct device *dev,
204				      struct device_attribute *devattr,
205				      char *buf)
206{
207	return sprintf(buf, "da9055-hwmon\n");
208}
209
210static ssize_t show_label(struct device *dev,
211			  struct device_attribute *devattr, char *buf)
212{
213	return sprintf(buf, "%s\n",
214		       input_names[to_sensor_dev_attr(devattr)->index]);
215}
216
217static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, da9055_read_auto_ch, NULL,
218			  DA9055_ADC_VSYS);
219static SENSOR_DEVICE_ATTR(in0_label, S_IRUGO, show_label, NULL,
220			  DA9055_ADC_VSYS);
221static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, da9055_read_auto_ch, NULL,
222			  DA9055_ADC_ADCIN1);
223static SENSOR_DEVICE_ATTR(in1_label, S_IRUGO, show_label, NULL,
224			  DA9055_ADC_ADCIN1);
225static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, da9055_read_auto_ch, NULL,
226			  DA9055_ADC_ADCIN2);
227static SENSOR_DEVICE_ATTR(in2_label, S_IRUGO, show_label, NULL,
228			  DA9055_ADC_ADCIN2);
229static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, da9055_read_auto_ch, NULL,
230			  DA9055_ADC_ADCIN3);
231static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_label, NULL,
232			  DA9055_ADC_ADCIN3);
233
234static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, da9055_read_tjunc, NULL,
235			  DA9055_ADC_TJUNC);
236static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, show_label, NULL,
237			  DA9055_ADC_TJUNC);
238
239static DEVICE_ATTR(name, S_IRUGO, da9055_hwmon_show_name, NULL);
 
240
241static struct attribute *da9055_attr[] = {
242	&dev_attr_name.attr,
243	&sensor_dev_attr_in0_input.dev_attr.attr,
244	&sensor_dev_attr_in0_label.dev_attr.attr,
245	&sensor_dev_attr_in1_input.dev_attr.attr,
246	&sensor_dev_attr_in1_label.dev_attr.attr,
247	&sensor_dev_attr_in2_input.dev_attr.attr,
248	&sensor_dev_attr_in2_label.dev_attr.attr,
249	&sensor_dev_attr_in3_input.dev_attr.attr,
250	&sensor_dev_attr_in3_label.dev_attr.attr,
251
252	&sensor_dev_attr_temp1_input.dev_attr.attr,
253	&sensor_dev_attr_temp1_label.dev_attr.attr,
254	NULL
255};
256
257static const struct attribute_group da9055_attr_group = {.attrs = da9055_attr};
258
259static int da9055_hwmon_probe(struct platform_device *pdev)
260{
 
261	struct da9055_hwmon *hwmon;
 
262	int hwmon_irq, ret;
263
264	hwmon = devm_kzalloc(&pdev->dev, sizeof(struct da9055_hwmon),
265			     GFP_KERNEL);
266	if (!hwmon)
267		return -ENOMEM;
268
269	mutex_init(&hwmon->hwmon_lock);
270	mutex_init(&hwmon->irq_lock);
271
272	init_completion(&hwmon->done);
273	hwmon->da9055 = dev_get_drvdata(pdev->dev.parent);
274
275	platform_set_drvdata(pdev, hwmon);
276
277	hwmon_irq = platform_get_irq_byname(pdev, "HWMON");
278	if (hwmon_irq < 0)
279		return hwmon_irq;
280
281	ret = devm_request_threaded_irq(&pdev->dev, hwmon_irq,
282					NULL, da9055_auxadc_irq,
283					IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
284					"adc-irq", hwmon);
285	if (ret != 0) {
286		dev_err(hwmon->da9055->dev, "DA9055 ADC IRQ failed ret=%d\n",
287			ret);
288		return ret;
289	}
290
291	ret = sysfs_create_group(&pdev->dev.kobj, &da9055_attr_group);
292	if (ret)
293		return ret;
294
295	hwmon->class_device = hwmon_device_register(&pdev->dev);
296	if (IS_ERR(hwmon->class_device)) {
297		ret = PTR_ERR(hwmon->class_device);
298		goto err;
299	}
300
301	return 0;
302
303err:
304	sysfs_remove_group(&pdev->dev.kobj, &da9055_attr_group);
305	return ret;
306}
307
308static int da9055_hwmon_remove(struct platform_device *pdev)
309{
310	struct da9055_hwmon *hwmon = platform_get_drvdata(pdev);
311
312	sysfs_remove_group(&pdev->dev.kobj, &da9055_attr_group);
313	hwmon_device_unregister(hwmon->class_device);
314
315	return 0;
316}
317
318static struct platform_driver da9055_hwmon_driver = {
319	.probe = da9055_hwmon_probe,
320	.remove = da9055_hwmon_remove,
321	.driver = {
322		.name = "da9055-hwmon",
323		.owner = THIS_MODULE,
324	},
325};
326
327module_platform_driver(da9055_hwmon_driver);
328
329MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
330MODULE_DESCRIPTION("DA9055 HWMON driver");
331MODULE_LICENSE("GPL");
332MODULE_ALIAS("platform:da9055-hwmon");