ftsteutates.c (cbecf716ca618fd44feda6bd9a64a8179d031fc5) ftsteutates.c (23bc3caf42bd0f140182ba60cc68d7872e81aeea)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Support for the FTS Systemmonitoring Chip "Teutates"
4 *
5 * Copyright (C) 2016 Fujitsu Technology Solutions GmbH,
6 * Thilo Cestonaro <thilo.cestonaro@ts.fujitsu.com>
7 */
8#include <linux/err.h>

--- 699 unchanged lines hidden (view full) ---

708/*****************************************************************************/
709/* Module initialization / remove functions */
710/*****************************************************************************/
711static int fts_detect(struct i2c_client *client,
712 struct i2c_board_info *info)
713{
714 int val;
715
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Support for the FTS Systemmonitoring Chip "Teutates"
4 *
5 * Copyright (C) 2016 Fujitsu Technology Solutions GmbH,
6 * Thilo Cestonaro <thilo.cestonaro@ts.fujitsu.com>
7 */
8#include <linux/err.h>

--- 699 unchanged lines hidden (view full) ---

708/*****************************************************************************/
709/* Module initialization / remove functions */
710/*****************************************************************************/
711static int fts_detect(struct i2c_client *client,
712 struct i2c_board_info *info)
713{
714 int val;
715
716 /* detection works with revsion greater or equal to 0x2b */
716 /* detection works with revision greater or equal to 0x2b */
717 val = i2c_smbus_read_byte_data(client, FTS_DEVICE_REVISION_REG);
718 if (val < 0x2b)
719 return -ENODEV;
720
721 /* Device Detect Regs must have 0x17 0x34 and 0x54 */
722 val = i2c_smbus_read_byte_data(client, FTS_DEVICE_DETECT_REG_1);
723 if (val != 0x17)
724 return -ENODEV;

--- 108 unchanged lines hidden ---
717 val = i2c_smbus_read_byte_data(client, FTS_DEVICE_REVISION_REG);
718 if (val < 0x2b)
719 return -ENODEV;
720
721 /* Device Detect Regs must have 0x17 0x34 and 0x54 */
722 val = i2c_smbus_read_byte_data(client, FTS_DEVICE_DETECT_REG_1);
723 if (val != 0x17)
724 return -ENODEV;

--- 108 unchanged lines hidden ---