| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2014 MediaTek Inc. |
|---|
| 3 | 4 | * Author: James Liao <jamesjj.liao@mediatek.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | |
|---|
| 15 | 7 | #include <linux/of.h> |
|---|
| .. | .. |
|---|
| 157 | 149 | int clr_ofs, |
|---|
| 158 | 150 | int sta_ofs, |
|---|
| 159 | 151 | u8 bit, |
|---|
| 160 | | - const struct clk_ops *ops) |
|---|
| 152 | + const struct clk_ops *ops, |
|---|
| 153 | + unsigned long flags, |
|---|
| 154 | + struct device *dev) |
|---|
| 161 | 155 | { |
|---|
| 162 | 156 | struct mtk_clk_gate *cg; |
|---|
| 163 | 157 | struct clk *clk; |
|---|
| .. | .. |
|---|
| 168 | 162 | return ERR_PTR(-ENOMEM); |
|---|
| 169 | 163 | |
|---|
| 170 | 164 | init.name = name; |
|---|
| 171 | | - init.flags = CLK_SET_RATE_PARENT; |
|---|
| 165 | + init.flags = flags | CLK_SET_RATE_PARENT; |
|---|
| 172 | 166 | init.parent_names = parent_name ? &parent_name : NULL; |
|---|
| 173 | 167 | init.num_parents = parent_name ? 1 : 0; |
|---|
| 174 | 168 | init.ops = ops; |
|---|
| .. | .. |
|---|
| 181 | 175 | |
|---|
| 182 | 176 | cg->hw.init = &init; |
|---|
| 183 | 177 | |
|---|
| 184 | | - clk = clk_register(NULL, &cg->hw); |
|---|
| 178 | + clk = clk_register(dev, &cg->hw); |
|---|
| 185 | 179 | if (IS_ERR(clk)) |
|---|
| 186 | 180 | kfree(cg); |
|---|
| 187 | 181 | |
|---|