Home
last modified time | relevance | path

Searched refs:rescale (Results 1 – 14 of 14) sorted by relevance

/linux-6.6.21/drivers/iio/afe/
Diio-rescale.c22 int rescale_process_scale(struct rescale *rescale, int scale_type, in rescale_process_scale() argument
33 *val *= rescale->numerator; in rescale_process_scale()
34 if (rescale->denominator == 1) in rescale_process_scale()
36 *val2 = rescale->denominator; in rescale_process_scale()
44 if (!check_mul_overflow(*val, rescale->numerator, &_val) && in rescale_process_scale()
45 !check_mul_overflow(*val2, rescale->denominator, &_val2)) { in rescale_process_scale()
53 tmp = div_s64(tmp, rescale->denominator); in rescale_process_scale()
54 tmp *= rescale->numerator; in rescale_process_scale()
86 tmp = (s64)abs(*val) * abs(rescale->numerator); in rescale_process_scale()
87 *val = div_s64_rem(tmp, abs(rescale->denominator), &rem); in rescale_process_scale()
[all …]
DKconfig10 tristate "IIO rescale"
17 module will be called iio-rescale.
DMakefile7 obj-$(CONFIG_IIO_RESCALE) += iio-rescale.o
/linux-6.6.21/include/linux/iio/afe/
Drescale.h13 struct rescale;
17 int (*props)(struct device *dev, struct rescale *rescale);
20 struct rescale { struct
31 int rescale_process_scale(struct rescale *rescale, int scale_type, argument
33 int rescale_process_offset(struct rescale *rescale, int scale_type,
/linux-6.6.21/drivers/iio/test/
Diio-test-rescale.c650 struct rescale rescale; in iio_rescale_test_scale() local
655 rescale.numerator = t->numerator; in iio_rescale_test_scale()
656 rescale.denominator = t->denominator; in iio_rescale_test_scale()
657 rescale.offset = t->offset; in iio_rescale_test_scale()
661 ret = rescale_process_scale(&rescale, t->schan_scale_type, in iio_rescale_test_scale()
680 struct rescale rescale; in iio_rescale_test_offset() local
684 rescale.numerator = t->numerator; in iio_rescale_test_offset()
685 rescale.denominator = t->denominator; in iio_rescale_test_offset()
686 rescale.offset = t->offset; in iio_rescale_test_offset()
690 ret = rescale_process_offset(&rescale, t->schan_scale_type, in iio_rescale_test_offset()
DKconfig8 tristate "Test IIO rescale conversion functions" if !KUNIT_ALL_TESTS
12 Build unit tests for the iio-rescale code.
DMakefile7 obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o
/linux-6.6.21/drivers/md/bcache/
Dstats.c139 if (++stats->rescale == rescale_at) { in scale_stats()
140 stats->rescale = 0; in scale_stats()
Dstats.h24 unsigned int rescale; member
Dalloc.c93 atomic_sub(sectors, &c->rescale); in bch_rescale_priorities()
96 r = atomic_read(&c->rescale); in bch_rescale_priorities()
100 } while (atomic_cmpxchg(&c->rescale, r, r + next) != r); in bch_rescale_priorities()
Drequest.c407 goto rescale; in check_should_bypass()
412 goto rescale; in check_should_bypass()
453 rescale: in check_should_bypass()
Dbcache.h612 atomic_t rescale; member
/linux-6.6.21/lib/zstd/decompress/
Dhuf_decompress.c1105 { int const rescale = (maxTableLog-tableLog) - 1; /* tableLog <= maxTableLog */ in HUF_readDTableX2_wksp_bmi2() local
1110 nextRankVal += wksp->rankStats[w] << (w+rescale); in HUF_readDTableX2_wksp_bmi2()
/linux-6.6.21/
DMAINTAINERS10218 F: drivers/iio/afe/iio-rescale.c