Generally it is better to use the regulator framework instead of the GPIO one.
CM4 shares the one CAM_GPIO line between the 2 camera connectors, and similarly you can have both a sensor and lens driver that want to control power on one module.
GPIOs can only be claimed by one driver, therefore you can't use the one line and load 2 drivers for 2 connected sensors (even if it is 2 instances of the same driver). Regulators are designed to be shared, with any user requesting power resulting in (reference counted) control of the GPIO.
In the standard DT you'll find node cam1_reg (and if applicable also cam0_reg for Compute Modules). These are correctly configured for the relevant GPIO on the platform, as it does move between variants of Pi.
If you look at imx219
as an example, you'll see calls to devm_regulator_bulk_get, regulator_bulk_enable, regulator_bulk_disable. Those are the calls you need to replicate in your driver, along with the associated linkage in the dtoverlay
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.