Lines Matching +full:device +full:- +full:sram
1 // SPDX-License-Identifier: GPL-2.0-only
30 * This function is limited to the GPU<->SRAM voltages relationships.
37 int max_spread = rdev->constraints->max_spread[0]; in mediatek_regulator_balance_voltage()
38 int vsram_min_uV = mrc->vsram_rdev->constraints->min_uV; in mediatek_regulator_balance_voltage()
39 int vsram_max_uV = mrc->vsram_rdev->constraints->max_uV; in mediatek_regulator_balance_voltage()
46 * If the target device is on, setting the SRAM voltage directly in mediatek_regulator_balance_voltage()
50 * that this is the first time we power up the SRAM regulator, which in mediatek_regulator_balance_voltage()
51 * implies that the target device has yet to perform initialization in mediatek_regulator_balance_voltage()
54 if (rdev == mrc->vsram_rdev) { in mediatek_regulator_balance_voltage()
55 if (rdev->use_count == 0) in mediatek_regulator_balance_voltage()
58 return -EPERM; in mediatek_regulator_balance_voltage()
87 pr_debug("Setting voltage %d-%duV on %s (minuV %d)\n", in mediatek_regulator_balance_voltage()
89 rdev_get_name(mrc->vsram_rdev), min_uV); in mediatek_regulator_balance_voltage()
91 ret = regulator_set_voltage_rdev(mrc->vsram_rdev, vsram_target_min_uV, in mediatek_regulator_balance_voltage()
96 /* The sram voltage is now balanced: update the target vreg voltage */ in mediatek_regulator_balance_voltage()
108 * this means that this is surely not a GPU<->SRAM couple: in that in mediatek_regulator_attach()
113 if (rdev->coupling_desc.n_coupled > 2) in mediatek_regulator_attach()
116 if (strstr(rdev_name, "sram")) { in mediatek_regulator_attach()
117 if (mrc->vsram_rdev) in mediatek_regulator_attach()
118 return -EINVAL; in mediatek_regulator_attach()
119 mrc->vsram_rdev = rdev; in mediatek_regulator_attach()
132 if (rdev == mrc->vsram_rdev) in mediatek_regulator_detach()
133 mrc->vsram_rdev = NULL; in mediatek_regulator_detach()