IIO_M_S_2_TO_G(9)
π IIO_M_S_2_TO_G π
okay so bestie, welcome to the Kernel API Manual page for IIO_M_S_2_TO_G β yes that's a whole mouthful, but it's literally the little macro that keeps your accelerometer from lying to you π«Ά
β¨ NAME β¨
IIO_M_S_2_TO_G β the glow-up machine that converts meter / secondΒ² into g π«
πΈ SYNOPSIS πΈ
IIO_M_S_2_TO_G (ms2 );
that's it. one argument. one macro. no drama, no cap π
π ARGUMENTS π
ms2β a value in meter / secondΒ², aka the units your physics teacher was obsessed with π§
π¦ DESCRIPTION π¦
So here's the tea: it returns the value you gave it, converted from meter / secondΒ² to g.
That's the whole vibe. In goes an acceleration in m/sΒ², out comes the same acceleration in g. slay π no side effects, no surprises, it's giving "small but iconic" π₯
π SEE ALSO π
the whole IIO friend group came to the function, and honestly? we love a supportive community π they all live around the Kernel file ./include/linux/iio/iio.h:
struct iio_chan_spec_ext_info(9)struct iio_enum(9)IIO_ENUM(9)IIO_ENUM_AVAILABLE(9)struct iio_mount_matrix(9)IIO_MOUNT_MATRIX(9)struct iio_event_spec(9)IIO_SCAN_FORMAT_SIGNED_INT(9)IIO_SCAN_FORMAT_UNSIGNED_INT(9)IIO_SCAN_FORMAT_FLOAT(9)struct iio_scan_type(9)struct iio_chan_spec(9)iio_channel_has_info(9)iio_channel_has_available(9)struct iio_info(9)struct iio_buffer_setup_ops(9)struct iio_dev(9)iio_device_register(9)devm_iio_device_register(9)iio_device_claim_direct(9)iio_device_release_direct(9)iio_device_try_claim_buffer_mode(9)iio_device_release_buffer_mode(9)IIO_DEV_ACQUIRE_DIRECT_MODE(9)IIO_DEV_ACQUIRE_FAILED(9)IIO_DEV_GUARD_CURRENT_MODE(9)iio_device_put(9)dev_to_iio_dev(9)iio_device_get(9)iio_device_set_parent(9)iio_device_set_drvdata(9)iio_device_get_drvdata(9)IIO_DECLARE_BUFFER_WITH_TS(9)IIO_DECLARE_DMA_BUFFER_WITH_TS(9)IIO_DECLARE_QUATERNION(9)iio_get_debugfs_dentry(9)iio_device_suspend_triggering(9)iio_device_resume_triggering(9)iio_get_current_scan_type(9)iio_get_masklength(9)iio_for_each_active_channel(9)IIO_DEGREE_TO_RAD(9)IIO_RAD_TO_DEGREE(9)IIO_G_TO_M_S_2(9)
also peep IIO_G_TO_M_S_2(9) at the bottom of that list β that's literally this macro's ride-or-die in the other direction, and we stan a bidirectional bestie duo ππ
anyway bestie, that's the whole page π
this little legend ships from ./include/linux/iio, stamped October 2026 β go forth and measure your g's with main character energy πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms