mma7660.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) | mma7660.c (072c7d3438888ca424e9d44e11f5d870749ba052) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Freescale MMA7660FC 3-Axis Accelerometer 4 * 5 * Copyright (c) 2016, Intel Corporation. 6 * 7 * IIO driver for Freescale MMA7660FC; 7-bit I2C address: 0x4c. 8 */ 9 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Freescale MMA7660FC 3-Axis Accelerometer 4 * 5 * Copyright (c) 2016, Intel Corporation. 6 * 7 * IIO driver for Freescale MMA7660FC; 7-bit I2C address: 0x4c. 8 */ 9 |
10#include <linux/acpi.h> | |
11#include <linux/i2c.h> | 10#include <linux/i2c.h> |
11#include <linux/mod_devicetable.h> |
|
12#include <linux/module.h> 13#include <linux/iio/iio.h> 14#include <linux/iio/sysfs.h> 15 16#define MMA7660_DRIVER_NAME "mma7660" 17 18#define MMA7660_REG_XOUT 0x00 19#define MMA7660_REG_YOUT 0x01 --- 230 unchanged lines hidden (view full) --- 250MODULE_DEVICE_TABLE(i2c, mma7660_i2c_id); 251 252static const struct of_device_id mma7660_of_match[] = { 253 { .compatible = "fsl,mma7660" }, 254 { } 255}; 256MODULE_DEVICE_TABLE(of, mma7660_of_match); 257 | 12#include <linux/module.h> 13#include <linux/iio/iio.h> 14#include <linux/iio/sysfs.h> 15 16#define MMA7660_DRIVER_NAME "mma7660" 17 18#define MMA7660_REG_XOUT 0x00 19#define MMA7660_REG_YOUT 0x01 --- 230 unchanged lines hidden (view full) --- 250MODULE_DEVICE_TABLE(i2c, mma7660_i2c_id); 251 252static const struct of_device_id mma7660_of_match[] = { 253 { .compatible = "fsl,mma7660" }, 254 { } 255}; 256MODULE_DEVICE_TABLE(of, mma7660_of_match); 257 |
258static const struct acpi_device_id __maybe_unused mma7660_acpi_id[] = { | 258static const struct acpi_device_id mma7660_acpi_id[] = { |
259 {"MMA7660", 0}, 260 {} 261}; 262 263MODULE_DEVICE_TABLE(acpi, mma7660_acpi_id); 264 265static struct i2c_driver mma7660_driver = { 266 .driver = { 267 .name = "mma7660", 268 .pm = pm_sleep_ptr(&mma7660_pm_ops), 269 .of_match_table = mma7660_of_match, | 259 {"MMA7660", 0}, 260 {} 261}; 262 263MODULE_DEVICE_TABLE(acpi, mma7660_acpi_id); 264 265static struct i2c_driver mma7660_driver = { 266 .driver = { 267 .name = "mma7660", 268 .pm = pm_sleep_ptr(&mma7660_pm_ops), 269 .of_match_table = mma7660_of_match, |
270 .acpi_match_table = ACPI_PTR(mma7660_acpi_id), | 270 .acpi_match_table = mma7660_acpi_id, |
271 }, 272 .probe = mma7660_probe, 273 .remove = mma7660_remove, 274 .id_table = mma7660_i2c_id, 275}; 276 277module_i2c_driver(mma7660_driver); 278 279MODULE_AUTHOR("Constantin Musca <constantin.musca@intel.com>"); 280MODULE_DESCRIPTION("Freescale MMA7660FC 3-Axis Accelerometer driver"); 281MODULE_LICENSE("GPL v2"); | 271 }, 272 .probe = mma7660_probe, 273 .remove = mma7660_remove, 274 .id_table = mma7660_i2c_id, 275}; 276 277module_i2c_driver(mma7660_driver); 278 279MODULE_AUTHOR("Constantin Musca <constantin.musca@intel.com>"); 280MODULE_DESCRIPTION("Freescale MMA7660FC 3-Axis Accelerometer driver"); 281MODULE_LICENSE("GPL v2"); |