Lines Matching refs:sdev
42 struct ssam_device *sdev; member
64 static int ssam_tmp_profile_get(struct ssam_device *sdev, enum ssam_tmp_profile *p) in ssam_tmp_profile_get() argument
69 status = ssam_retry(__ssam_tmp_profile_get, sdev, &info); in ssam_tmp_profile_get()
77 static int ssam_tmp_profile_set(struct ssam_device *sdev, enum ssam_tmp_profile p) in ssam_tmp_profile_set() argument
81 return ssam_retry(__ssam_tmp_profile_set, sdev, &profile_le); in ssam_tmp_profile_set()
84 static int ssam_fan_profile_set(struct ssam_device *sdev, enum ssam_fan_profile p) in ssam_fan_profile_set() argument
88 return ssam_retry(__ssam_fan_profile_set, sdev->ctrl, &profile); in ssam_fan_profile_set()
91 static int convert_ssam_tmp_to_profile(struct ssam_device *sdev, enum ssam_tmp_profile p) in convert_ssam_tmp_to_profile() argument
107 dev_err(&sdev->dev, "invalid performance profile: %d", p); in convert_ssam_tmp_to_profile()
113 static int convert_profile_to_ssam_tmp(struct ssam_device *sdev, enum platform_profile_option p) in convert_profile_to_ssam_tmp() argument
135 static int convert_profile_to_ssam_fan(struct ssam_device *sdev, enum platform_profile_option p) in convert_profile_to_ssam_fan() argument
166 status = ssam_tmp_profile_get(tpd->sdev, &tp); in ssam_platform_profile_get()
170 status = convert_ssam_tmp_to_profile(tpd->sdev, tp); in ssam_platform_profile_get()
186 tp = convert_profile_to_ssam_tmp(tpd->sdev, profile); in ssam_platform_profile_set()
190 tp = ssam_tmp_profile_set(tpd->sdev, tp); in ssam_platform_profile_set()
195 tp = convert_profile_to_ssam_fan(tpd->sdev, profile); in ssam_platform_profile_set()
198 tp = ssam_fan_profile_set(tpd->sdev, tp); in ssam_platform_profile_set()
220 static int surface_platform_profile_probe(struct ssam_device *sdev) in surface_platform_profile_probe() argument
224 tpd = devm_kzalloc(&sdev->dev, sizeof(*tpd), GFP_KERNEL); in surface_platform_profile_probe()
228 tpd->sdev = sdev; in surface_platform_profile_probe()
229 ssam_device_set_drvdata(sdev, tpd); in surface_platform_profile_probe()
231 tpd->has_fan = device_property_read_bool(&sdev->dev, "has_fan"); in surface_platform_profile_probe()
233 tpd->ppdev = devm_platform_profile_register(&sdev->dev, "Surface Platform Profile", in surface_platform_profile_probe()