summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* i2cdetect: only use "newer" I2C_FUNC_* flags if they existHEADmasterWolfram Sang2023-02-231-0/+4
| | | | | | | | | This allows i2cdetect to be compiled for older kernels. Reported-by: "Poeche, Uwe" <uwe.poeche@siemens.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* i2cdetect: display more functionality bits with '-F'Wolfram Sang2022-12-051-0/+6
| | | | | | | | | | Original motivation was to add I2C_FUNC_SLAVE, so users can easily find out if their hardware supports being a target. While here, add HostNotify and 10-bit addressing as well. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* i2c-tools: Implement and document option -hJean Delvare2022-05-2410-15/+50
| | | | | | | | | | Add an option -h to display the help of the tools. This is a common practice so users may expect it to work. Based on a preliminary patch from David Kerns. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2c-tools: Use getoptJean Delvare2022-05-245-94/+76
| | | | | | | | | | | | | Use the standard C getopt() function instead of parsing the options manually. The benefit of this move is that getopt() supports merged flags (for example -fy instead of -f -y) and does not require options to come first on the command line. As this is pretty standard by now, not supporting such possibilities can confuse and disappoint the user. Based on a preliminary patch from David Kerns. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2cget: add mode character for SMBus block read to manpageWolfram Sang2022-03-301-1/+1
| | | | | | | | | The text was updated, but the mode character was forgotten. Fixes: 789af53 ("i2cget: Add support for SMBus block read") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* py-smbus: Use setuptools instead of distutilsRoss Burton2022-01-191-1/+1
| | | | | | | | | | | | | As per [1], distutils is deprecated in Python 3.10 and will be removed entirely in Python 3.12. As setuptools is essentially an enhanced version of distutils, it's trivial to port to that. [1] https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* i2cdetect: fix a typo argment -> argumentAurelien Jarno2022-01-031-2/+2
| | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* py-smbus/Module.mk: Install with PREFIX definedMorten Linderud2021-10-041-1/+1
| | | | | | | | | If we are building to a defined destdir py-smbus is going to ignore this and try install to the actual root. This breaks packaging setups as the install section would fail. Signed-off-by: Morten Linderud <morten@linderud.pw> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Makefile: Drop KERNELVERSIONBaruch Siach2021-08-011-2/+0
| | | | | | | | KERNELVERSION is unused since commit 4b89e48a1039f ("Delete the decode-xeon script..."). Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* i2cdump: Remove support for SMBus block modeJean Delvare2021-07-222-68/+20
| | | | | | | | Users can turn to i2cget for this feature. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* Post-release version markerJean Delvare2021-07-221-1/+1
|
* Set version to 4.3v4.3Jean Delvare2021-07-223-3/+3
|
* CHANGES: Update for the upcoming releaseJean Delvare2021-07-151-2/+6
| | | | | | | Add all relevant information to the CHANGES file. Fix the leading case of some entries for consistency. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* i2cdump: Deprecate SMBus block modeJean Delvare2021-07-132-10/+7
| | | | | | | | | | i2cget is a better fit for this mode. Having it in i2cdump requires special-casing in various places, which makes the code harder to read and maintain. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2cdump: Add range support with mode i (I2C block)Jean Delvare2021-07-132-8/+8
| | | | | | | | | Implementing range support for I2C block read (mode i) isn't particularly difficult so let's just do that. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2cdump: Remove dead codeJean Delvare2021-07-131-3/+0
| | | | | | | | | | | | | | | | | Considering that we exit immediately if an error happens during a block read, the code filling the remaining bytes with -1 (so that they will be displayed as "XX") is effectively dead code, so let's remove it. We might want to revisit the whole logic later, as there's in fact little reason why block read errors would be fatal when all other read errors are not. But I'd rather remove SMBus block support from the tool before attempting to clean up the code. Fixes: 7abc52d7792e ("Return the correct error code on I2C block read failure.") Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2cget: Add support for SMBus block readJean Delvare2021-07-132-5/+19
| | | | | | | | | | | Now that i2cget supports I2C block read, adding support for SMBus block read is trivial. This restores the symmetry between i2cset and i2cget, and paves the road for the removal of SMBus block read support from i2cdump. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2cget: Document the support of I2C block readJean Delvare2021-07-131-5/+19
| | | | | | | | | Mention I2C block read support in the i2cget(8) manual page, together with an example. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2cget: Add support for I2C block dataCrestez Dan Leonard2021-07-131-10/+56
| | | | | | | | | | | | | | | | | | | | This adds mode 'i' for I2C_SMBUS_I2C_BLOCK_DATA. This is the same mode letter from i2cdump. Length is optional and defaults to 32 (maximum). The intended use is debugging i2c devices with shell commands. [JD: Fix the build (wrong variable name) Ensure PEC isn't used in I2C block mode Don't print the length (doesn't add value and could be mistaken as an offset Various cleanups] Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* i2cdetect: Sort the bus list by numberJean Delvare2021-06-022-0/+12
| | | | | | | The bus list (option -l) will be easier to read once sorted, as typically this will group the buses by driver. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Actually decode LPDDR3 modulesJean Delvare2021-06-022-0/+2
| | | | | | | | | In commit 78ed68308b58 ("decode-dimms: Decode manufacturing data for LPDDR3") we said we would handle LPDDR3 the same as DDR3, however it was actually only done for the manufacturing data. Extend the idea to the rest of the script. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Revert "tools: i2ctransfer: add check for returned length from driver"Wolfram Sang2021-03-072-6/+2
| | | | | | | | | | | This reverts commit 34806fc4e7090b34e32fa1110d546ab5ce01a6a0. It was developed against an experimental kernel. The regular kernel does not update the new message length to userspace, so the check is always false positive. We can't change the kernel behaviour because it would break the ABI. So revert this commit. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* eeprom, eepromer: remove the toolsWolfram Sang2021-03-0711-1312/+4
| | | | | | | | These tools are deprecated for 6 years now because we have better alternatives. They are not built by default. I think it is time we can remove them. Signed-off-by: Wolfram Sang <wsa@kernel.org>
* Post-release version markerJean Delvare2020-09-221-1/+1
|
* Set version to 4.2v4.2Jean Delvare2020-09-223-3/+3
|
* CHANGES: Update for the upcoming releaseJean Delvare2020-09-111-4/+22
| | | | | | | | Add all relevant information to the CHANGES file. Fix the leading case of some entries for consistency, and remove one which wasn't worth mentioning. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Manual pages: Mention the current maintainerJean Delvare2020-09-109-9/+18
| | | | | | | | Add the current maintainer to the mailing list as the contact points for bug reports. This ensure that the reports will be read by the right person. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-vaio: Scan more i2c busesJean Delvare2020-09-101-1/+1
| | | | | | | | | | While the laptop I originally developed decode-vaio on, only had 5 i2c buses, there could be more on other models, and there are definitely more on the system I use to test the script (using i2c-stub) these days. So look for the VAIO EEPROM on up to 32 i2c buses to be on the safe side. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-vaio: Add support for the at24 driverJean Delvare2020-09-101-4/+37
| | | | | | | We have just added support for the VAIO EEPROM to the at24 kernel driver, so let this script handle it. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* There are several eeprom driversJean Delvare2020-09-102-3/+4
| | | | | | | | | | There used to be only 1 eeprom driver (named "eeprom") but now there are 3 and the legacy "eeprom" driver is not the preferred option. So list all 3 drivers in our documentation to prevent confusion. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa@kernel.org>
* libi2c: Add a manual page to document the APIJean Delvare2020-09-083-2/+146
| | | | | | It is good practice for a library to come with a complete API description. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* i2cset: Fix short writes with maskJean Delvare2020-09-081-12/+13
| | | | | | | | | | | | | | | Short writes used "daddress" for the value, but the masking code did not expect that, and instead applied the mask to a variable that was never used. So change short writes to use "value" for the value, as all other commands do. Adjust all code paths accordingly. Reported by David Jedynak. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* tools: i2ctransfer: add check for returned length from driverWolfram Sang2020-08-291-1/+6
| | | | | | | | Emit a warning if the bus master driver in the kernel did not set the message length correctly with I2C_M_RECV_LEN. This can be determined from the returned value in the buffer. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
* decode-dimms: Update the list of vendors to Jedec JEP106BBJean Delvare2020-08-271-16/+95
| | | | | | | | | | Update the list of memory vendors as of June 2020, including 14 renames. I also added a runtime sanity check on the number of vendors per page, as it is very easy to get it wrong. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* i2ctransfer: add support for I2C_M_RECV_LENWolfram Sang2020-08-103-12/+34
| | | | | Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* add BUGS section to manpagesWolfram Sang2020-08-109-0/+31
| | | | | | | | | For all manpages installed on my Debian system, add a BUGS section, so people can easily find whom to contact. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
* allow to preset custom CFLAGS and LDFLAGSWolfram Sang2020-08-104-7/+8
| | | | | | | | Sometimes I need to add some flags (like -static for the linker), so allow this for all CFLAGS and LDFLAGS used in this project. Signed-off-by: Wolfram Sang <wsa@kernel.org> Acked-by: Jean Delvare <jdelvare@suse.de>
* i2c-stub-from-dump: Read dumps from hexdump -CJean Delvare2020-03-171-2/+2
| | | | | | | Make the parser more flexible so as to recognize the dump files generated by "hexdump -C" as a valid input. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Point the user to the right driversJean Delvare2019-10-021-3/+6
| | | | | | | The header comment only mentioned the legacy eeprom driver, while the at24 and ee1004 drivers should be used nowadays. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Fix the version stringJean Delvare2019-10-021-6/+3
| | | | | | | We moved away from Subversion long ago, so $Revision$ and $Date$ are no longer being resolved. Just use the version of i2c-tools itself. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Decode manufacturing data for LPDDR3Jean Delvare2019-10-021-1/+2
| | | | | | | I assume the manufacturing data format for LPDDR3 is the same as regular DDR3. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Add DDR5 memory types to the listJean Delvare2019-10-021-0/+1
| | | | | | | No information available yet about the contents of the DDR5 SPD EEPROMs but we can already report the basic memory type. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Print DDR memory speed in MT/s not MHzJean Delvare2019-10-021-4/+4
| | | | | | | | Because it is DDR memory, transaction rate is twice the actual clock speed. What the user is interested in is MT/s, and that's the number we display, so use the right unit. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Print kernel driver usedJean Delvare2019-10-021-7/+17
| | | | | | | | When not reading from dump files, print which kernel driver is being used. This will help spot setup mistakes where the legacy eeprom driver stole EEPROMs from the ee1004 driver for DDR4 memory. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Detect and report truncated input filesJean Delvare2019-10-021-7/+21
| | | | | | | | | If using the wrong driver, or if reading from a truncated dump file, make sure we don't attempt to use data bytes beyond what is available. Doing so would spit pages of cryptic warnings to the user, explicit error messages are much better. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Round DDR4 speed properlyJean Delvare2019-09-031-9/+21
| | | | | | | | | | | | | | The cycle time of high-speed memory modules is stored rounded. We already have a heuristic to un-round it and display the expected speed for DDR3 modules. Use the same heuristic for DDR4. For example this will make PC4-17000 memory properly displayed as operating at 2133 MHz instead of 2132 MHz. As a side effect, this fixes a bug where the maximum speed wouldn't be listed in section "Timings at Standard Speeds" if it had been computed incorrectly due to the rounded cycle time. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* decode-dimms: Add MAC abbreviation for DDR4Jean Delvare2019-06-191-1/+1
| | | | For consistency as we display "(MAC)" for DDR3.
* decode-dimms: display MAC from DDR3 SPDFrancois Cartegnie2019-06-191-0/+6
| | | | | | | JEDEC Standard No. 21-C, Annex K, Release 6 Byte 41 is specified, the lower part containing the MAC value, identical as DDR4.
* tools: restrict all addresses defined by the standardWolfram Sang2019-04-2311-14/+15
| | | | | | | | | The I2C standard reserves addresses 0x03-0x07. Adapt our tools to that. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* tools: i2ctransfer: consequently document -aWolfram Sang2019-04-232-3/+6
| | | | | | | | | | The text describing the address to be used did not reflect the recent change where some of the functionality of '-f' has been seperated into '-a'. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>