.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Arizona core driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2012 Wolfson Microelectronics plc |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/clk.h> |
---|
.. | .. |
---|
48 | 45 | if (arizona->clk32k_ref == 1) { |
---|
49 | 46 | switch (arizona->pdata.clk32k_src) { |
---|
50 | 47 | case ARIZONA_32KZ_MCLK1: |
---|
51 | | - ret = pm_runtime_get_sync(arizona->dev); |
---|
| 48 | + ret = pm_runtime_resume_and_get(arizona->dev); |
---|
52 | 49 | if (ret != 0) |
---|
53 | 50 | goto err_ref; |
---|
54 | 51 | ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK1]); |
---|
.. | .. |
---|
83 | 80 | { |
---|
84 | 81 | mutex_lock(&arizona->clk_lock); |
---|
85 | 82 | |
---|
86 | | - BUG_ON(arizona->clk32k_ref <= 0); |
---|
| 83 | + WARN_ON(arizona->clk32k_ref <= 0); |
---|
87 | 84 | |
---|
88 | 85 | arizona->clk32k_ref--; |
---|
89 | 86 | |
---|
.. | .. |
---|
817 | 814 | int ret, i; |
---|
818 | 815 | |
---|
819 | 816 | /* Handle old non-standard DT binding */ |
---|
820 | | - pdata->reset = devm_gpiod_get_from_of_node(arizona->dev, |
---|
821 | | - arizona->dev->of_node, |
---|
822 | | - "wlf,reset", 0, |
---|
823 | | - GPIOD_OUT_LOW, |
---|
824 | | - "arizona /RESET"); |
---|
| 817 | + pdata->reset = devm_gpiod_get(arizona->dev, "wlf,reset", GPIOD_OUT_LOW); |
---|
825 | 818 | if (IS_ERR(pdata->reset)) { |
---|
826 | 819 | ret = PTR_ERR(pdata->reset); |
---|
827 | 820 | |
---|
.. | .. |
---|
990 | 983 | |
---|
991 | 984 | int arizona_dev_init(struct arizona *arizona) |
---|
992 | 985 | { |
---|
993 | | - const char * const mclk_name[] = { "mclk1", "mclk2" }; |
---|
| 986 | + static const char * const mclk_name[] = { "mclk1", "mclk2" }; |
---|
994 | 987 | struct device *dev = arizona->dev; |
---|
995 | 988 | const char *type_name = NULL; |
---|
996 | 989 | unsigned int reg, val; |
---|