adt7475.c (5603effb8295ada8419408d038a34ca89d658229) adt7475.c (2a8e41ad337508fc5d598c0f9288890214f8e318)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * adt7475 - Thermal sensor driver for the ADT7475 chip and derivatives
4 * Copyright (C) 2007-2008, Advanced Micro Devices, Inc.
5 * Copyright (C) 2008 Jordan Crouse <jordan@cosmicpenguin.net>
6 * Copyright (C) 2008 Hans de Goede <hdegoede@redhat.com>
7 * Copyright (C) 2009 Jean Delvare <jdelvare@suse.de>
8 *

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

1599}
1600
1601static int adt7475_set_pwm_polarity(struct i2c_client *client)
1602{
1603 u32 states[ADT7475_PWM_COUNT];
1604 int ret, i;
1605 u8 val;
1606
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * adt7475 - Thermal sensor driver for the ADT7475 chip and derivatives
4 * Copyright (C) 2007-2008, Advanced Micro Devices, Inc.
5 * Copyright (C) 2008 Jordan Crouse <jordan@cosmicpenguin.net>
6 * Copyright (C) 2008 Hans de Goede <hdegoede@redhat.com>
7 * Copyright (C) 2009 Jean Delvare <jdelvare@suse.de>
8 *

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

1599}
1600
1601static int adt7475_set_pwm_polarity(struct i2c_client *client)
1602{
1603 u32 states[ADT7475_PWM_COUNT];
1604 int ret, i;
1605 u8 val;
1606
1607 ret = of_property_read_u32_array(client->dev.of_node,
1608 "adi,pwm-active-state", states,
1609 ARRAY_SIZE(states));
1607 ret = device_property_read_u32_array(&client->dev,
1608 "adi,pwm-active-state", states,
1609 ARRAY_SIZE(states));
1610 if (ret)
1611 return ret;
1612
1613 for (i = 0; i < ADT7475_PWM_COUNT; i++) {
1614 ret = adt7475_read(PWM_CONFIG_REG(i));
1615 if (ret < 0)
1616 return ret;
1617 val = ret;

--- 405 unchanged lines hidden ---
1610 if (ret)
1611 return ret;
1612
1613 for (i = 0; i < ADT7475_PWM_COUNT; i++) {
1614 ret = adt7475_read(PWM_CONFIG_REG(i));
1615 if (ret < 0)
1616 return ret;
1617 val = ret;

--- 405 unchanged lines hidden ---