mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
Merge branch 'i2c/for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: - the I2C core gained helpers to assist drivers in handling their suspended state, and drivers were converted to use it - two new fault-injectors for stress-testing - bigger refactoring and feature improvements for the ocores, sh_mobile, and tegra drivers - platform_data removal for the at24 EEPROM driver - ... and various improvements and bugfixes all over the subsystem * 'i2c/for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (69 commits) i2c: Allow recovery of the initial IRQ by an I2C client device. i2c: ocores: turn incomplete kdoc into a comment i2c: designware: Do not allow i2c_dw_xfer() calls while suspended i2c: tegra: Only display error messages if DMA setup fails i2c: gpio: fault-injector: add 'inject_panic' injector i2c: gpio: fault-injector: add 'lose_arbitration' injector i2c: tegra: remove multi-master support i2c: tegra: remove master fifo support on tegra186 i2c: tegra: change phrasing, "fallbacking" to "falling back" i2c: expand minor range when registering chrdev region i2c: aspeed: Add multi-master use case support i2c: core-smbus: don't trace smbus_reply data on errors i2c: ocores: Add support for bus clock via platform data i2c: ocores: Add support for IO mapper registers. i2c: ocores: checkpatch fixes i2c: ocores: add SPDX tag i2c: ocores: add polling interface i2c: ocores: do not handle IRQ if IF is not set i2c: ocores: stop transfer on timeout i2c: tegra: add i2c interface timing support ...
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* at24.h - platform_data for the at24 (generic eeprom) driver
|
||||
* (C) Copyright 2008 by Pengutronix
|
||||
* (C) Copyright 2012 by Wolfram Sang
|
||||
* same license as the driver
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_AT24_H
|
||||
#define _LINUX_AT24_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/nvmem-consumer.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
/**
|
||||
* struct at24_platform_data - data to set up at24 (generic eeprom) driver
|
||||
* @byte_len: size of eeprom in byte
|
||||
* @page_size: number of byte which can be written in one go
|
||||
* @flags: tunable options, check AT24_FLAG_* defines
|
||||
* @setup: an optional callback invoked after eeprom is probed; enables kernel
|
||||
code to access eeprom via nvmem, see example
|
||||
* @context: optional parameter passed to setup()
|
||||
*
|
||||
* If you set up a custom eeprom type, please double-check the parameters.
|
||||
* Especially page_size needs extra care, as you risk data loss if your value
|
||||
* is bigger than what the chip actually supports!
|
||||
*
|
||||
* An example in pseudo code for a setup() callback:
|
||||
*
|
||||
* void get_mac_addr(struct nvmem_device *nvmem, void *context)
|
||||
* {
|
||||
* u8 *mac_addr = ethernet_pdata->mac_addr;
|
||||
* off_t offset = context;
|
||||
*
|
||||
* // Read MAC addr from EEPROM
|
||||
* if (nvmem_device_read(nvmem, offset, ETH_ALEN, mac_addr) == ETH_ALEN)
|
||||
* pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr);
|
||||
* }
|
||||
*
|
||||
* This function pointer and context can now be set up in at24_platform_data.
|
||||
*/
|
||||
|
||||
struct at24_platform_data {
|
||||
u32 byte_len; /* size (sum of all addr) */
|
||||
u16 page_size; /* for writes */
|
||||
u8 flags;
|
||||
#define AT24_FLAG_ADDR16 BIT(7) /* address pointer is 16 bit */
|
||||
#define AT24_FLAG_READONLY BIT(6) /* sysfs-entry will be read-only */
|
||||
#define AT24_FLAG_IRUGO BIT(5) /* sysfs-entry will be world-readable */
|
||||
#define AT24_FLAG_TAKE8ADDR BIT(4) /* take always 8 addresses (24c00) */
|
||||
#define AT24_FLAG_SERIAL BIT(3) /* factory-programmed serial number */
|
||||
#define AT24_FLAG_MAC BIT(2) /* factory-programmed mac address */
|
||||
#define AT24_FLAG_NO_RDROL BIT(1) /* does not auto-rollover reads to */
|
||||
/* the next slave address */
|
||||
|
||||
void (*setup)(struct nvmem_device *nvmem, void *context);
|
||||
void *context;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_AT24_H */
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* i2c-cbus-gpio.h - CBUS I2C platform_data definition
|
||||
*
|
||||
* Copyright (C) 2004-2009 Nokia Corporation
|
||||
*
|
||||
* Written by Felipe Balbi and Aaro Koskinen.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General
|
||||
* Public License. See the file "COPYING" in the main directory of this
|
||||
* archive for more details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __INCLUDE_LINUX_I2C_CBUS_GPIO_H
|
||||
#define __INCLUDE_LINUX_I2C_CBUS_GPIO_H
|
||||
|
||||
struct i2c_cbus_platform_data {
|
||||
int dat_gpio;
|
||||
int clk_gpio;
|
||||
int sel_gpio;
|
||||
};
|
||||
|
||||
#endif /* __INCLUDE_LINUX_I2C_CBUS_GPIO_H */
|
||||
@@ -1,11 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* i2c-ocores.h - definitions for the i2c-ocores interface
|
||||
*
|
||||
* Peter Korsgaard <peter@korsgaard.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_I2C_OCORES_H
|
||||
@@ -15,6 +12,7 @@ struct ocores_i2c_platform_data {
|
||||
u32 reg_shift; /* register offset shift value */
|
||||
u32 reg_io_width; /* register io read/write width */
|
||||
u32 clock_khz; /* input clock in kHz */
|
||||
u32 bus_khz; /* bus clock in kHz */
|
||||
bool big_endian; /* registers are big endian */
|
||||
u8 num_devices; /* number of devices in the devices list */
|
||||
struct i2c_board_info const *devices; /* devices connected to the bus */
|
||||
|
||||
Reference in New Issue
Block a user