From 61598093bbdd283a7edc367d900f223070ead8d2 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 10 May 2024 07:43:03 +0000 Subject: [PATCH] add ax88772C AX88772C_eeprom_tools --- kernel/drivers/rtc/rtc-hym8563.c | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/kernel/drivers/rtc/rtc-hym8563.c b/kernel/drivers/rtc/rtc-hym8563.c index 2896c02..f1c3fb4 100644 --- a/kernel/drivers/rtc/rtc-hym8563.c +++ b/kernel/drivers/rtc/rtc-hym8563.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Haoyu HYM8563 RTC driver * @@ -6,15 +7,6 @@ * * based on rtc-HYM8563 * Copyright (C) 2010 ROCKCHIP, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * 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. */ #include <linux/module.h> @@ -102,6 +94,8 @@ int ret; ret = i2c_smbus_read_i2c_block_data(client, HYM8563_SEC, 7, buf); + if (ret < 0) + return ret; tm->tm_sec = bcd2bin(buf[0] & HYM8563_SEC_MASK); tm->tm_min = bcd2bin(buf[1] & HYM8563_MIN_MASK); @@ -417,17 +411,11 @@ struct i2c_client *client = hym8563->client; struct device_node *node = client->dev.of_node; struct clk *clk; - struct clk_init_data init = {}; - int ret; - - ret = i2c_smbus_write_byte_data(client, HYM8563_CLKOUT, - 0); - if (ret < 0) - return ERR_PTR(ret); + struct clk_init_data init; init.name = "hym8563-clkout"; init.ops = &hym8563_clkout_ops; - init.flags = 0; + init.flags = CLK_IS_CRITICAL; init.parent_names = NULL; init.num_parents = 0; hym8563->clkout_hw.init = &init; -- Gitblit v1.6.2