opt3001.c (98817a84ff1c755c347ac633ff017a623a631fad) | opt3001.c (3593cd53962fa17e4eaaae8faa5c8f62ec7bbd5e) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/** 3 * opt3001.c - Texas Instruments OPT3001 Light Sensor 4 * | 1// SPDX-License-Identifier: GPL-2.0-only 2/** 3 * opt3001.c - Texas Instruments OPT3001 Light Sensor 4 * |
5 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com | 5 * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com |
6 * 7 * Author: Andreas Dannenberg <dannenberg@ti.com> 8 * Based on previous work from: Felipe Balbi <balbi@ti.com> 9 */ 10 11#include <linux/bitops.h> 12#include <linux/delay.h> 13#include <linux/device.h> --- 749 unchanged lines hidden (view full) --- 763 764 ret = opt3001_configure(opt); 765 if (ret) 766 return ret; 767 768 iio->name = client->name; 769 iio->channels = opt3001_channels; 770 iio->num_channels = ARRAY_SIZE(opt3001_channels); | 6 * 7 * Author: Andreas Dannenberg <dannenberg@ti.com> 8 * Based on previous work from: Felipe Balbi <balbi@ti.com> 9 */ 10 11#include <linux/bitops.h> 12#include <linux/delay.h> 13#include <linux/device.h> --- 749 unchanged lines hidden (view full) --- 763 764 ret = opt3001_configure(opt); 765 if (ret) 766 return ret; 767 768 iio->name = client->name; 769 iio->channels = opt3001_channels; 770 iio->num_channels = ARRAY_SIZE(opt3001_channels); |
771 iio->dev.parent = dev; | |
772 iio->modes = INDIO_DIRECT_MODE; 773 iio->info = &opt3001_info; 774 775 ret = devm_iio_device_register(dev, iio); 776 if (ret) { 777 dev_err(dev, "failed to register IIO device\n"); 778 return ret; 779 } --- 77 unchanged lines hidden --- | 771 iio->modes = INDIO_DIRECT_MODE; 772 iio->info = &opt3001_info; 773 774 ret = devm_iio_device_register(dev, iio); 775 if (ret) { 776 dev_err(dev, "failed to register IIO device\n"); 777 return ret; 778 } --- 77 unchanged lines hidden --- |