How can use linux command set on or off the "DVDD_CAM_1V8" at TX2?

How can use linux command set on or off the “DVDD_CAM_1V8” at TX2?

hello sensor_test,

please check you would like to control regulator or gpio?

Regulator
there’s regulator_enable() kernel function to enable regulator output, you should control it via kernel sources.
you should check the reference drivers, and you’ll found it parse regulator via device tree.
taking avdd as an example,

<i>$l4t-r32.2/public_sources/kernel_src/kernel/nvidia/drivers/media/i2c/imx274.c </i>

static
struct camera_common_pdata *imx274_parse_dt(struct tegracam_device *tc_dev)
{
	of_property_read_string(node, "avdd-reg",
			&board_priv_pdata->regulators.avdd);

<i>$l4t-r32.2/public_sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-imx274-a00.dtsi </i>

	i2c@3180000 {
		tca9546@70 {
			i2c@0 {
			imx274_a@1a {
				avdd-reg = "vana";

<i>$l4t-r32.2/public_sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-camera-imx274-a00.dtsi </i>

				imx274_a@1a {
					vana-supply = <&en_vdd_cam_hv_2v8>;

GPIO
please access Jetson TX2 Platform Adaptation and Bring-Up Guide, you should also check the [GPIO Changes] session for the GPIO number calculations. then you’re able to control it via system nodes.
taking GPIO-220 as an example,

# cd /sys/class/gpio
# echo 220 > export
# echo out > direction && echo 1 > value