cregit-Linux how code gets into the kernel

Release 4.16 drivers/clk/meson/gxbb-aoclk-regmap.c

/*
 * Copyright (c) 2017 BayLibre, SAS.
 * Author: Neil Armstrong <narmstrong@baylibre.com>
 *
 * SPDX-License-Identifier: GPL-2.0+
 */

#include <linux/clk-provider.h>
#include <linux/bitfield.h>
#include <linux/regmap.h>
#include "gxbb-aoclk.h"


static int aoclk_gate_regmap_enable(struct clk_hw *hw) { struct aoclk_gate_regmap *gate = to_aoclk_gate_regmap(hw); return regmap_update_bits(gate->regmap, AO_RTI_GEN_CNTL_REG0, BIT(gate->bit_idx), BIT(gate->bit_idx)); }

Contributors

PersonTokensPropCommitsCommitProp
Neil Armstrong45100.00%1100.00%
Total45100.00%1100.00%


static void aoclk_gate_regmap_disable(struct clk_hw *hw) { struct aoclk_gate_regmap *gate = to_aoclk_gate_regmap(hw); regmap_update_bits(gate->regmap, AO_RTI_GEN_CNTL_REG0, BIT(gate->bit_idx), 0); }

Contributors

PersonTokensPropCommitsCommitProp
Neil Armstrong39100.00%1100.00%
Total39100.00%1100.00%


static int aoclk_gate_regmap_is_enabled(struct clk_hw *hw) { struct aoclk_gate_regmap *gate = to_aoclk_gate_regmap(hw); unsigned int val; int ret; ret = regmap_read(gate->regmap, AO_RTI_GEN_CNTL_REG0, &val); if (ret) return ret; return (val & BIT(gate->bit_idx)) != 0; }

Contributors

PersonTokensPropCommitsCommitProp
Neil Armstrong63100.00%1100.00%
Total63100.00%1100.00%

const struct clk_ops meson_aoclk_gate_regmap_ops = { .enable = aoclk_gate_regmap_enable, .disable = aoclk_gate_regmap_disable, .is_enabled = aoclk_gate_regmap_is_enabled, };

Overall Contributors

PersonTokensPropCommitsCommitProp
Neil Armstrong182100.00%1100.00%
Total182100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.