-
Richard Fitzgerald authored
Use kunit_device_register() to create a real struct device for the regmap instead of leaving it at NULL. The main reason for this is that it allows context data to be passed into the readable_reg/writable_reg/volatile_reg functions by attaching it to the struct device with dev_set_drvdata(). The gen_regmap() and gen_raw_regmap() functions are updated to take a struct kunit * argument. A new struct regmap_test_priv has been created to hold the struct device created by kunit_device_register(). This allows the struct to be extended in the future to hold more private data for the test suite. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://msgid.link/r/20240408144600.230848-3-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
7b7982f1