From 5c6720246f347263056999c54740bcfd1f35da91 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Wed, 6 Sep 2023 20:49:57 +0800 Subject: [PATCH] usb: typec: Setting same toggle time is not error Invoking fusb301_set_toggle_time() with input parameter same as current register value to set toggle time shouldn't be treated as error. This patch is to change message level from dev_err() to dev_info() when above situation is met. Bug 4218496 Signed-off-by: Jim Lin Change-Id: Ieab7cfe8ae8496ca4a5f3b514d9e278479f200d0 Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2946869 (cherry picked from commit 2a53cb0010a449ffd5ce6d6afe7f39dc5d020e65) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990991 Reviewed-by: svcacv Reviewed-by: Haotien Hsu Reviewed-by: WK Tsai GVS: Gerrit_Virtual_Submit --- drivers/usb/typec/fusb301.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/fusb301.c b/drivers/usb/typec/fusb301.c index 8929cf81..6d2b81d4 100644 --- a/drivers/usb/typec/fusb301.c +++ b/drivers/usb/typec/fusb301.c @@ -1,9 +1,22 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2021, LGE Inc. All rights reserved. - * Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved. + * + * SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ - #include #include #include @@ -358,7 +371,7 @@ static int fusb301_set_toggle_time(struct fusb301_chip *chip, u8 toggle_time) return -EINVAL; } if (toggle_time == chip->dttime) { - dev_err(cdev, "toggle_time(%d) is not updated\n", toggle_time); + dev_info(cdev, "toggle_time(%d) is not updated\n", toggle_time); return rc; } rc = fusb301_write_masked_byte(chip->client,