• Home
  • Raw
  • Download

Lines Matching refs:tegra

39 static int tegra30_core_limit(struct tegra_regulator_coupler *tegra,  in tegra30_core_limit()  argument
57 if (tegra_pmc_core_domain_state_synced() && !tegra->sys_reboot_mode) { in tegra30_core_limit()
62 if (tegra->core_min_uV > 0) in tegra30_core_limit()
63 return tegra->core_min_uV; in tegra30_core_limit()
80 tegra->core_min_uV = core_max_uV; in tegra30_core_limit()
82 pr_info("core voltage initialized to %duV\n", tegra->core_min_uV); in tegra30_core_limit()
84 return tegra->core_min_uV; in tegra30_core_limit()
116 static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, in tegra30_voltage_update() argument
162 core_min_uV = tegra30_core_limit(tegra, core_rdev); in tegra30_voltage_update()
196 if (!tegra->cpu_min_uV) in tegra30_voltage_update()
197 tegra->cpu_min_uV = cpu_uV; in tegra30_voltage_update()
223 if (tegra->sys_reboot_mode) in tegra30_voltage_update()
224 cpu_min_uV = max(cpu_min_uV, tegra->cpu_min_uV); in tegra30_voltage_update()
285 struct tegra_regulator_coupler *tegra = to_tegra_coupler(coupler); in tegra30_regulator_balance_voltage() local
286 struct regulator_dev *core_rdev = tegra->core_rdev; in tegra30_regulator_balance_voltage()
287 struct regulator_dev *cpu_rdev = tegra->cpu_rdev; in tegra30_regulator_balance_voltage()
294 tegra->sys_reboot_mode = READ_ONCE(tegra->sys_reboot_mode_req); in tegra30_regulator_balance_voltage()
296 return tegra30_voltage_update(tegra, cpu_rdev, core_rdev); in tegra30_regulator_balance_voltage()
299 static int tegra30_regulator_prepare_reboot(struct tegra_regulator_coupler *tegra, in tegra30_regulator_prepare_reboot() argument
304 if (!tegra->core_rdev || !tegra->cpu_rdev) in tegra30_regulator_prepare_reboot()
307 WRITE_ONCE(tegra->sys_reboot_mode_req, true); in tegra30_regulator_prepare_reboot()
314 err = regulator_sync_voltage_rdev(tegra->cpu_rdev); in tegra30_regulator_prepare_reboot()
318 err = regulator_sync_voltage_rdev(tegra->core_rdev); in tegra30_regulator_prepare_reboot()
322 WRITE_ONCE(tegra->sys_reboot_mode_req, sys_reboot_mode); in tegra30_regulator_prepare_reboot()
330 struct tegra_regulator_coupler *tegra; in tegra30_regulator_reboot() local
336 tegra = container_of(notifier, struct tegra_regulator_coupler, in tegra30_regulator_reboot()
339 ret = tegra30_regulator_prepare_reboot(tegra, true); in tegra30_regulator_reboot()
347 struct tegra_regulator_coupler *tegra = to_tegra_coupler(coupler); in tegra30_regulator_attach() local
351 !tegra->core_rdev) { in tegra30_regulator_attach()
352 tegra->core_rdev = rdev; in tegra30_regulator_attach()
357 !tegra->cpu_rdev) { in tegra30_regulator_attach()
358 tegra->cpu_rdev = rdev; in tegra30_regulator_attach()
368 struct tegra_regulator_coupler *tegra = to_tegra_coupler(coupler); in tegra30_regulator_detach() local
378 if (tegra->core_rdev == rdev) { in tegra30_regulator_detach()
379 tegra->core_rdev = NULL; in tegra30_regulator_detach()
383 if (tegra->cpu_rdev == rdev) { in tegra30_regulator_detach()
384 tegra->cpu_rdev = NULL; in tegra30_regulator_detach()