Source
static int ti_abb_clear_all_txdone(struct device *dev, const struct ti_abb *abb)
/*
* Texas Instruments SoC Adaptive Body Bias(ABB) Regulator
*
* Copyright (C) 2011 Texas Instruments, Inc.
* Mike Turquette <mturquette@ti.com>
*
* Copyright (C) 2012-2013 Texas Instruments, Inc.
* Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
* Nishanth Menon <nm@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
* kind, whether express or implied; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* ABB LDO operating states:
* NOMINAL_OPP: bypasses the ABB LDO
* FAST_OPP: sets ABB LDO to Forward Body-Bias
* SLOW_OPP: sets ABB LDO to Reverse Body-Bias
*/
/**
* struct ti_abb_info - ABB information per voltage setting
* @opp_sel: one of TI_ABB macro
* @vset: (optional) vset value that LDOVBB needs to be overriden with.
*
* Array of per voltage entries organized in the same order as regulator_desc's
* volt_table list. (selector is used to index from this array)
*/
struct ti_abb_info {
u32 opp_sel;
u32 vset;
};
/**
* struct ti_abb_reg - Register description for ABB block
* @setup_off: setup register offset from base
* @control_off: control register offset from base
* @sr2_wtcnt_value_mask: setup register- sr2_wtcnt_value mask
* @fbb_sel_mask: setup register- FBB sel mask
* @rbb_sel_mask: setup register- RBB sel mask
* @sr2_en_mask: setup register- enable mask
* @opp_change_mask: control register - mask to trigger LDOVBB change
* @opp_sel_mask: control register - mask for mode to operate
*/
struct ti_abb_reg {
u32 setup_off;
u32 control_off;
/* Setup register fields */
u32 sr2_wtcnt_value_mask;
u32 fbb_sel_mask;
u32 rbb_sel_mask;
u32 sr2_en_mask;
/* Control register fields */
u32 opp_change_mask;
u32 opp_sel_mask;
};
/**
* struct ti_abb - ABB instance data
* @rdesc: regulator descriptor
* @clk: clock(usually sysclk) supplying ABB block
* @base: base address of ABB block
* @setup_reg: setup register of ABB block
* @control_reg: control register of ABB block
* @int_base: interrupt register base address
* @efuse_base: (optional) efuse base address for ABB modes
* @ldo_base: (optional) LDOVBB vset override base address
* @regs: pointer to struct ti_abb_reg for ABB block
* @txdone_mask: mask on int_base for tranxdone interrupt