evdev_get_trackpoint_multiplier(struct evdev_device *device)
{
	struct quirks_context *quirks;
	struct quirks *q;
	double multiplier = 1.0;

	if (!(device->tags & EVDEV_TAG_TRACKPOINT))
		return 1.0;

	quirks = evdev_libinput_context(device)->quirks;
	q = quirks_fetch_for_device(quirks, device->udev_device);
	if (q) {
		quirks_get_double(q, QUIRK_ATTR_TRACKPOINT_MULTIPLIER, &multiplier);
		quirks_unref(q);
	}

	if (multiplier <= 0.0) {
		evdev_log_bug_libinput(device,
				       "trackpoint multiplier %.2f is invalid\n",
				       multiplier);
		multiplier = 1.0;
	}

	if (multiplier != 1.0)
		evdev_log_info(device,
			       "trackpoint multiplier is %.2f\n",
			       multiplier);

	return multiplier;
}
evdev_get_trackpoint_multiplier(struct evdev_device *device)
{
	struct quirks_context *quirks;
	struct quirks *q;
	double multiplier = 1.0;

	if (!(device->tags & EVDEV_TAG_TRACKPOINT))
		return 1.0;

	quirks = evdev_libinput_context(device)->quirks;
	q = quirks_fetch_for_device(quirks, device->udev_device);
	if (q) {
		quirks_get_double(q, QUIRK_ATTR_TRACKPOINT_MULTIPLIER, &multiplier);
		quirks_unref(q);
	}

	if (multiplier <= 0.0) {
		evdev_log_bug_libinput(device,
				       "trackpoint multiplier %.2f is invalid\n",
				       multiplier);
		multiplier = 1.0;
	}

	if (multiplier != 1.0)
		evdev_log_info(device,
			       "trackpoint multiplier is %.2f\n",
			       multiplier);

	return multiplier;
}