| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * tps65010 - driver for tps6501x power management chips |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2004 Texas Instruments |
|---|
| 5 | 6 | * Copyright (C) 2004-2005 David Brownell |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 9 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 10 | | - * (at your option) any later version. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program; if not, write to the Free Software |
|---|
| 19 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 20 | 7 | */ |
|---|
| 21 | 8 | |
|---|
| 22 | 9 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 417 | 404 | tps65010_interrupt(tps); |
|---|
| 418 | 405 | |
|---|
| 419 | 406 | if (test_and_clear_bit(FLAG_VBUS_CHANGED, &tps->flags)) { |
|---|
| 420 | | - int status; |
|---|
| 421 | 407 | u8 chgconfig, tmp; |
|---|
| 422 | 408 | |
|---|
| 423 | 409 | chgconfig = i2c_smbus_read_byte_data(tps->client, |
|---|
| .. | .. |
|---|
| 428 | 414 | else if (tps->vbus >= 100) |
|---|
| 429 | 415 | chgconfig |= TPS_VBUS_CHARGING; |
|---|
| 430 | 416 | |
|---|
| 431 | | - status = i2c_smbus_write_byte_data(tps->client, |
|---|
| 432 | | - TPS_CHGCONFIG, chgconfig); |
|---|
| 417 | + i2c_smbus_write_byte_data(tps->client, |
|---|
| 418 | + TPS_CHGCONFIG, chgconfig); |
|---|
| 433 | 419 | |
|---|
| 434 | 420 | /* vbus update fails unless VBUS is connected! */ |
|---|
| 435 | 421 | tmp = i2c_smbus_read_byte_data(tps->client, TPS_CHGCONFIG); |
|---|